mirror of
https://github.com/home-assistant/core.git
synced 2025-06-25 01:21:51 +02:00
Update tuya-device-sharing-sdk to version 0.2.1 (#130333)
This commit is contained in:
@ -146,14 +146,21 @@ class DeviceListener(SharingDeviceListener):
|
||||
self.hass = hass
|
||||
self.manager = manager
|
||||
|
||||
def update_device(self, device: CustomerDevice) -> None:
|
||||
def update_device(
|
||||
self, device: CustomerDevice, updated_status_properties: list[str] | None
|
||||
) -> None:
|
||||
"""Update device status."""
|
||||
LOGGER.debug(
|
||||
"Received update for device %s: %s",
|
||||
"Received update for device %s: %s (updated properties: %s)",
|
||||
device.id,
|
||||
self.manager.device_map[device.id].status,
|
||||
updated_status_properties,
|
||||
)
|
||||
dispatcher_send(
|
||||
self.hass,
|
||||
f"{TUYA_HA_SIGNAL_UPDATE_ENTITY}_{device.id}",
|
||||
updated_status_properties,
|
||||
)
|
||||
dispatcher_send(self.hass, f"{TUYA_HA_SIGNAL_UPDATE_ENTITY}_{device.id}")
|
||||
|
||||
def add_device(self, device: CustomerDevice) -> None:
|
||||
"""Add device added listener."""
|
||||
|
@ -283,10 +283,15 @@ class TuyaEntity(Entity):
|
||||
async_dispatcher_connect(
|
||||
self.hass,
|
||||
f"{TUYA_HA_SIGNAL_UPDATE_ENTITY}_{self.device.id}",
|
||||
self.async_write_ha_state,
|
||||
self._handle_state_update,
|
||||
)
|
||||
)
|
||||
|
||||
async def _handle_state_update(
|
||||
self, updated_status_properties: list[str] | None
|
||||
) -> None:
|
||||
self.async_write_ha_state()
|
||||
|
||||
def _send_command(self, commands: list[dict[str, Any]]) -> None:
|
||||
"""Send command to the device."""
|
||||
LOGGER.debug("Sending commands for device %s: %s", self.device.id, commands)
|
||||
|
@ -43,5 +43,5 @@
|
||||
"integration_type": "hub",
|
||||
"iot_class": "cloud_push",
|
||||
"loggers": ["tuya_iot"],
|
||||
"requirements": ["tuya-device-sharing-sdk==0.1.9"]
|
||||
"requirements": ["tuya-device-sharing-sdk==0.2.1"]
|
||||
}
|
||||
|
@ -2873,7 +2873,7 @@ ttls==1.8.3
|
||||
ttn_client==1.2.0
|
||||
|
||||
# homeassistant.components.tuya
|
||||
tuya-device-sharing-sdk==0.1.9
|
||||
tuya-device-sharing-sdk==0.2.1
|
||||
|
||||
# homeassistant.components.twentemilieu
|
||||
twentemilieu==2.0.1
|
||||
|
@ -2286,7 +2286,7 @@ ttls==1.8.3
|
||||
ttn_client==1.2.0
|
||||
|
||||
# homeassistant.components.tuya
|
||||
tuya-device-sharing-sdk==0.1.9
|
||||
tuya-device-sharing-sdk==0.2.1
|
||||
|
||||
# homeassistant.components.twentemilieu
|
||||
twentemilieu==2.0.1
|
||||
|
Reference in New Issue
Block a user