Add exception handler for vera timeout
parent
4c3d6981a6
commit
7204bc018f
|
@ -126,5 +126,8 @@ class VeraSwitch(ToggleEntity):
|
||||||
def update(self):
|
def update(self):
|
||||||
# We need to debounce the status call after turning switch on or off
|
# We need to debounce the status call after turning switch on or off
|
||||||
# because the vera has some lag in updating the device status
|
# because the vera has some lag in updating the device status
|
||||||
if (self.last_command_send + 5) < time.time():
|
try:
|
||||||
self.is_on_status = self.vera_device.is_switched_on()
|
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)
|
||||||
|
|
Loading…
Reference in New Issue