Improved exception handling for D-Link switch (#4633)

pull/4635/head
Christian Brædstrup 2016-11-29 17:40:51 +01:00 committed by Paulus Schoutsen
parent 154c69a454
commit 6ddbb4d568
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.const import TEMP_CELSIUS, STATE_UNKNOWN
REQUIREMENTS = ['https://github.com/LinuxChristian/pyW215/archive/'
'v0.3.6.zip#pyW215==0.3.6']
'v0.3.7.zip#pyW215==0.3.7']
_LOGGER = logging.getLogger(__name__)
@ -78,7 +78,7 @@ class SmartPlugSwitch(SwitchDevice):
TEMP_CELSIUS)
temperature = "%i %s" % \
(ui_temp, self.units.temperature_unit)
except ValueError:
except (ValueError, TypeError):
temperature = STATE_UNKNOWN
try:

View File

@ -170,7 +170,7 @@ https://github.com/Danielhiversen/flux_led/archive/0.9.zip#flux_led==0.9
https://github.com/GadgetReactor/pyHS100/archive/1f771b7d8090a91c6a58931532e42730b021cbde.zip#pyHS100==0.2.0
# homeassistant.components.switch.dlink
https://github.com/LinuxChristian/pyW215/archive/v0.3.6.zip#pyW215==0.3.6
https://github.com/LinuxChristian/pyW215/archive/v0.3.7.zip#pyW215==0.3.7
# homeassistant.components.media_player.webostv
# homeassistant.components.notify.webostv