mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add exception handler for vera timeout
This commit is contained in:
parent
4c3d6981a6
commit
7204bc018f
@ -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
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user