Add Tado error handling to fetching devices (#105546)
This commit is contained in:
parent
9d44dc4437
commit
fb615817b4
1 changed files with 6 additions and 1 deletions
|
@ -181,7 +181,12 @@ class TadoConnector:
|
||||||
|
|
||||||
def update_devices(self):
|
def update_devices(self):
|
||||||
"""Update the device data from Tado."""
|
"""Update the device data from Tado."""
|
||||||
|
try:
|
||||||
devices = self.tado.getDevices()
|
devices = self.tado.getDevices()
|
||||||
|
except RuntimeError:
|
||||||
|
_LOGGER.error("Unable to connect to Tado while updating devices")
|
||||||
|
return
|
||||||
|
|
||||||
for device in devices:
|
for device in devices:
|
||||||
device_short_serial_no = device["shortSerialNo"]
|
device_short_serial_no = device["shortSerialNo"]
|
||||||
_LOGGER.debug("Updating device %s", device_short_serial_no)
|
_LOGGER.debug("Updating device %s", device_short_serial_no)
|
||||||
|
|
Loading…
Add table
Reference in a new issue