From 25894d3c008a0e574362c5c011b07c460c7045e5 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 4 Dec 2019 09:28:08 +0100 Subject: [PATCH] Only return the first element of status() --- 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 c3f1646632..00b8cec1e2 100644 --- a/platypush/plugins/switch/wemo/__init__.py +++ b/platypush/plugins/switch/wemo/__init__.py @@ -127,7 +127,7 @@ class SwitchWemoPlugin(SwitchPlugin): :param device: Device name or address """ self._exec(device=device, action=SwitchAction.SET_STATE, value=1) - return self.status(device) + return self.status(device).output[0] @action def off(self, device: str, **kwargs): @@ -137,7 +137,7 @@ class SwitchWemoPlugin(SwitchPlugin): :param device: Device name or address """ self._exec(device=device, action=SwitchAction.SET_STATE, value=0) - return self.status(device) + return self.status(device).output[0] @action def toggle(self, device: str, *args, **kwargs):