XiaomiGateway3 icon indicating copy to clipboard operation
XiaomiGateway3 copied to clipboard

Fix bug with battery for xiaomi.sensor_occupy.03

Open AlexxIT opened this issue 10 months ago • 0 comments

2024-12-30 10:37:40.180 ERROR (MainThread) [custom_components.xiaomi_gateway3.gate.192.168.1.17] {'msg': 'dispatch_event: add_device (<custom_components.xiaomi_gateway3.core.device.XDevice object at 0x7faab438cc80>,) {}'}
Traceback (most recent call last):
  File "/config/custom_components/xiaomi_gateway3/core/gate/base.py", line 91, in dispatch_event
    handler(*args, **kwargs)
    ~~~~~~~^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_gateway3/hass/add_entitites.py", line 36, in add_device
    if remove_listener := handle_lazy_entities(hass, config_entry, device):
                          ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_gateway3/hass/add_entitites.py", line 139, in handle_lazy_entities
    add_lazy_entity(attr)
    ~~~~~~~~~~~~~~~^^^^^^
  File "/config/custom_components/xiaomi_gateway3/hass/add_entitites.py", line 124, in add_lazy_entity
    entity = create_entity(device, conv)
  File "/config/custom_components/xiaomi_gateway3/hass/add_entitites.py", line 91, in create_entity
    return cls(device, conv)
TypeError: 'NoneType' object is not callable

AlexxIT avatar Dec 30 '24 09:12 AlexxIT