mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Add Tado error handling to fetching devices (#105546)
This commit is contained in:
parent
9d44dc4437
commit
fb615817b4
@ -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…
x
Reference in New Issue
Block a user