Skip to content

Commit

Permalink
🔧 fix entity for miio2miot
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Dec 3, 2024
1 parent fd76fe7 commit 7faaa0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/xiaomi_miot/core/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions custom_components/xiaomi_miot/core/hass_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7faaa0e

Please sign in to comment.