From 70d6ce5b7996485f5c89500c8d403dbbc27595f9 Mon Sep 17 00:00:00 2001 From: s1gnalrunner Date: Thu, 26 May 2016 14:53:10 +0200 Subject: [PATCH] Fixed issue with edimax SP-1101 switches (#2105) * Fixed issue with edimax SP-1101 switches * Added missing ValueError exception --- homeassistant/components/switch/edimax.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/switch/edimax.py b/homeassistant/components/switch/edimax.py index 0461230bd14..8240be692ba 100644 --- a/homeassistant/components/switch/edimax.py +++ b/homeassistant/components/switch/edimax.py @@ -61,6 +61,8 @@ class SmartPlugSwitch(SwitchDevice): return float(self.smartplug.now_power) / 1000000.0 except ValueError: return None + except TypeError: + return None @property def today_power_mw(self): @@ -69,6 +71,8 @@ class SmartPlugSwitch(SwitchDevice): return float(self.smartplug.now_energy_day) / 1000.0 except ValueError: return None + except TypeError: + return None @property def is_on(self):