Merge pull request #668 from pavoni/handle_vera_timeout

Add exception handler for vera timeout
This commit is contained in:
Paulus Schoutsen 2015-11-27 10:23:19 -08:00
commit ada612e09d

View file

@ -126,5 +126,8 @@ class VeraSwitch(ToggleEntity):
def update(self):
# We need to debounce the status call after turning switch on or off
# because the vera has some lag in updating the device status
if (self.last_command_send + 5) < time.time():
self.is_on_status = self.vera_device.is_switched_on()
try:
if (self.last_command_send + 5) < time.time():
self.is_on_status = self.vera_device.is_switched_on()
except RequestException:
_LOGGER.warning('Could not update status for %s', self.name)