From c34c8586f4e91c5358070d0d5074a316b8c4bb75 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 4 Dec 2019 09:32:56 +0100 Subject: [PATCH] Fixed KeyError --- platypush/plugins/switch/wemo/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/switch/wemo/__init__.py b/platypush/plugins/switch/wemo/__init__.py index 08ededf5..c8cee331 100644 --- a/platypush/plugins/switch/wemo/__init__.py +++ b/platypush/plugins/switch/wemo/__init__.py @@ -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):