Fixed KeyError

This commit is contained in:
Fabio Manganiello 2019-12-04 09:32:56 +01:00
parent 10ab1751d8
commit c34c8586f4
1 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ class SwitchWemoPlugin(SwitchPlugin):
:param device: Device name or address
"""
self._exec(device=device, action=SwitchAction.SET_STATE, value=1)
return self.status(device).output[0]
return self.status(device)
@action
def off(self, device: str, **kwargs):
@ -139,7 +139,7 @@ class SwitchWemoPlugin(SwitchPlugin):
:param device: Device name or address
"""
self._exec(device=device, action=SwitchAction.SET_STATE, value=0)
return self.status(device).output[0]
return self.status(device)
@action
def toggle(self, device: str, *args, **kwargs):