1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-20 02:48:57 +00:00

Bump tuya-device-sharing-sdk to 0.2.3 (#151659)

This commit is contained in:
epenet
2025-09-04 10:37:25 +02:00
committed by GitHub
parent 86e7f3713f
commit 8d945d89de
6 changed files with 21 additions and 9 deletions

View File

@@ -227,21 +227,29 @@ class DeviceListener(SharingDeviceListener):
self.hass = hass
self.manager = manager
def update_device(
self, device: CustomerDevice, updated_status_properties: list[str] | None
# pylint disable can be removed when issue fixed in library
# https://github.com/tuya/tuya-device-sharing-sdk/pull/35
def update_device( # pylint: disable=arguments-renamed
self,
device: CustomerDevice,
updated_status_properties: list[str] | None = None,
dp_timestamps: dict | None = None,
) -> None:
"""Update device status."""
"""Update device status with optional DP timestamps."""
LOGGER.debug(
"Received update for device %s (online: %s): %s (updated properties: %s)",
"Received update for device %s (online: %s): %s"
" (updated properties: %s, dp_timestamps: %s)",
device.id,
device.online,
device.status,
updated_status_properties,
dp_timestamps,
)
dispatcher_send(
self.hass,
f"{TUYA_HA_SIGNAL_UPDATE_ENTITY}_{device.id}",
updated_status_properties,
dp_timestamps,
)
def add_device(self, device: CustomerDevice) -> None:

View File

@@ -158,7 +158,9 @@ class TuyaEntity(Entity):
)
async def _handle_state_update(
self, updated_status_properties: list[str] | None
self,
updated_status_properties: list[str] | None,
dp_timestamps: dict | None = None,
) -> None:
self.async_write_ha_state()

View File

@@ -134,7 +134,9 @@ class TuyaEventEntity(TuyaEntity, EventEntity):
self._attr_event_types: list[str] = dpcode.range
async def _handle_state_update(
self, updated_status_properties: list[str] | None
self,
updated_status_properties: list[str] | None,
dp_timestamps: dict | None = None,
) -> None:
if (
updated_status_properties is None

View File

@@ -43,5 +43,5 @@
"integration_type": "hub",
"iot_class": "cloud_push",
"loggers": ["tuya_iot"],
"requirements": ["tuya-device-sharing-sdk==0.2.1"]
"requirements": ["tuya-device-sharing-sdk==0.2.3"]
}

2
requirements_all.txt generated
View File

@@ -2991,7 +2991,7 @@ ttls==1.8.3
ttn_client==1.2.0
# homeassistant.components.tuya
tuya-device-sharing-sdk==0.2.1
tuya-device-sharing-sdk==0.2.3
# homeassistant.components.twentemilieu
twentemilieu==2.2.1

View File

@@ -2465,7 +2465,7 @@ ttls==1.8.3
ttn_client==1.2.0
# homeassistant.components.tuya
tuya-device-sharing-sdk==0.2.1
tuya-device-sharing-sdk==0.2.3
# homeassistant.components.twentemilieu
twentemilieu==2.2.1