Fixed error when reading Tasmota status response

Signed-off-by: Matthias Neumayr <matt.neumayr@gmail.com>
This commit is contained in:
Matthias Neumayr 2020-11-21 12:41:07 +01:00 committed by Eric Callahan
parent 4415a3c858
commit a2327a093b
1 changed files with 2 additions and 2 deletions

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}"