Add online status to Tuya debug log (#151222)

This commit is contained in:
epenet
2025-08-27 10:45:00 +02:00
committed by GitHub
parent 3a48c9569c
commit fc1c0d22b9

View File

@@ -154,8 +154,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: TuyaConfigEntry) -> bool
device_registry = dr.async_get(hass)
for device in manager.device_map.values():
LOGGER.debug(
"Register device %s: %s (function: %s, status range: %s)",
"Register device %s (online: %s): %s (function: %s, status range: %s)",
device.id,
device.online,
device.status,
device.function,
device.status_range,
@@ -231,9 +232,10 @@ class DeviceListener(SharingDeviceListener):
) -> None:
"""Update device status."""
LOGGER.debug(
"Received update for device %s: %s (updated properties: %s)",
"Received update for device %s (online: %s): %s (updated properties: %s)",
device.id,
self.manager.device_map[device.id].status,
device.online,
device.status,
updated_status_properties,
)
dispatcher_send(
@@ -248,8 +250,9 @@ class DeviceListener(SharingDeviceListener):
self.hass.add_job(self.async_remove_device, device.id)
LOGGER.debug(
"Add device %s: %s (function: %s, status range: %s)",
"Add device %s (online: %s): %s (function: %s, status range: %s)",
device.id,
device.online,
device.status,
device.function,
device.status_range,