Skip to content

Commit

Permalink
Fixed issue with edimax SP-1101 switches (home-assistant#2105)
Browse files Browse the repository at this point in the history
* Fixed issue with edimax SP-1101 switches

* Added missing ValueError exception
  • Loading branch information
s1gnalrunner authored and balloob committed May 26, 2016
1 parent 71452c1 commit 70d6ce5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions homeassistant/components/switch/edimax.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def current_power_mwh(self):
return float(self.smartplug.now_power) / 1000000.0
except ValueError:
return None
except TypeError:
return None

@property
def today_power_mw(self):
Expand All @@ -69,6 +71,8 @@ def today_power_mw(self):
return float(self.smartplug.now_energy_day) / 1000.0
except ValueError:
return None
except TypeError:
return None

@property
def is_on(self):
Expand Down

0 comments on commit 70d6ce5

Please sign in to comment.