Merge pull request #668 from pavoni/handle_vera_timeout
Add exception handler for vera timeout
This commit is contained in:
commit
ada612e09d
1 file changed
+5
-2
@@ -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)
|
||||
Reference in new issue
Block a user