Skip to content

error in the log #298

@edkazic

Description

@edkazic

Version of the custom_component

Configuration

2023-11-29 10:09:47.398 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform dius
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
entity.add_to_platform_start(
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 218, in add_to_platform_start
if self.unique_id is None or self.device_class is None:
^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 356, in unique_id
return self._attr_unique_id
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dius/entity.py", line 22, in _attr_unique_id
return data.get(Msg_keys.mac.value)
^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
2023-11-29 10:09:47.400 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up dius platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 367, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 563, in _async_add_entity
entity.add_to_platform_start(
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 218, in add_to_platform_start
if self.unique_id is None or self.device_class is None:
^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 356, in unique_id
return self._attr_unique_id
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dius/entity.py", line 22, in _attr_unique_id
return data.get(Msg_keys.mac.value)
^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

Describe the bug

A clear and concise description of what the bug is.

Debug log


Add your logs here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions