Fixed error when reading Tasmota status response

Signed-off-by: Matthias Neumayr <matt.neumayr@gmail.com>
This commit is contained in:
Matthias Neumayr authored and Eric Callahan committed 2020-11-21 13:59:29 -05:00
1 parent 4415a3c858
commit a2327a093b
1 file changed
+2 -2
+2 -2
View File
@@ -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}"