diff --git a/homeassistant/components/switch/tplink.py b/homeassistant/components/switch/tplink.py index 961ee72496e..f740a5f1614 100644 --- a/homeassistant/components/switch/tplink.py +++ b/homeassistant/components/switch/tplink.py @@ -83,6 +83,7 @@ class SmartPlugSwitch(SwitchDevice): def update(self): """Update the TP-Link switch's state.""" + from pyHS100 import SmartPlugException try: self._state = self.smartplug.state == \ self.smartplug.SWITCH_STATE_ON @@ -107,5 +108,5 @@ class SmartPlugSwitch(SwitchDevice): # device returned no daily history pass - except OSError: - _LOGGER.warning('Could not update status for %s', self.name) + except (SmartPlugException, OSError) as ex: + _LOGGER.warning('Could not read state for %s: %s', self.name, ex)