diff --git a/custom_components/xiaomi_miot/core/device.py b/custom_components/xiaomi_miot/core/device.py index c8ec12e27..17c65c592 100644 --- a/custom_components/xiaomi_miot/core/device.py +++ b/custom_components/xiaomi_miot/core/device.py @@ -678,7 +678,9 @@ async def update_miot_status( try: if self.miio2miot: results = await self.miio2miot.async_get_miot_props(self.local, mapping) - self.props.update(self.miio2miot.entity_attrs()) + if attrs := self.miio2miot.entity_attrs(): + self.props.update(attrs) + self.dispatch(self.decode_attrs(attrs)) else: if not max_properties: max_properties = self.custom_config_integer('chunk_properties') diff --git a/custom_components/xiaomi_miot/core/hass_entity.py b/custom_components/xiaomi_miot/core/hass_entity.py index 60877c297..cbbb27dc3 100644 --- a/custom_components/xiaomi_miot/core/hass_entity.py +++ b/custom_components/xiaomi_miot/core/hass_entity.py @@ -67,6 +67,7 @@ def __init__(self, device: 'Device', conv: 'BaseConv'): self.hass = device.hass self.conv = conv self.attr = conv.attr + self.log = device.log if isinstance(conv, MiotPropConv): self.entity_id = conv.prop.generate_entity_id(self, conv.domain)