Skip to content

Commit

Permalink
Fix bug with battery for xiaomi.sensor_occupy.03 #1532
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Dec 30, 2024
1 parent 6a240dd commit 28edc8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/xiaomi_gateway3/hass/add_entitites.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def handle_lazy_entities(
def add_lazy_entity(attr: str) -> XEntity:
lazy_attrs.remove(attr)

conv = next(i for i in device.converters if i.attr == attr)
# important to check non empty domain for some BLE devices
conv = next(i for i in device.converters if i.attr == attr and i.domain)
entity = create_entity(device, conv)

gw = CONFIG_ENTRIES.get(device.did)
Expand Down

0 comments on commit 28edc8a

Please sign in to comment.