From a2327a093b99c2f78de3b1bf4c4d08d44b396dfc Mon Sep 17 00:00:00 2001 From: Matthias Neumayr Date: Sat, 21 Nov 2020 12:41:07 +0100 Subject: [PATCH] Fixed error when reading Tasmota status response Signed-off-by: Matthias Neumayr --- moonraker/plugins/power.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moonraker/plugins/power.py b/moonraker/plugins/power.py index 1351e9e..4720a89 100644 --- a/moonraker/plugins/power.py +++ b/moonraker/plugins/power.py @@ -383,7 +383,7 @@ class Tasmota: async def refresh_status(self): try: res = await self._send_tasmota_command("info") - state = res[f"Power{self.output_id}"].lower() + state = res[f"POWER{self.output_id}"].lower() except Exception: self.state = "error" msg = f"Error Refeshing Device Status: {self.name}" @@ -394,7 +394,7 @@ class Tasmota: async def set_power(self, state): try: res = await self._send_tasmota_command(state) - state = res[f"Power{self.output_id}"].lower() + state = res[f"POWER{self.output_id}"].lower() except Exception: self.state = "error" msg = f"Error Setting Device Status: {self.name} to {state}"