Switch did not update (#4466)

This commit is contained in:
John Arild Berentsen 2016-11-19 15:52:42 +01:00 committed by GitHub
parent 93747f2766
commit 8beefcfc69

View file

@ -54,6 +54,7 @@ class NeatoConnectedSwitch(ToggleEntity):
self.neato.update_robots()
if not self._state:
return
self._state = self.robot.state
_LOGGER.debug('self._state=%s', self._state)
if self.type == SWITCH_TYPE_CLEAN:
if (self.robot.state['action'] == 1 and