Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in the log #298

Open
edkazic opened this issue Nov 29, 2023 · 1 comment
Open

error in the log #298

edkazic opened this issue Nov 29, 2023 · 1 comment

Comments

@edkazic
Copy link

edkazic commented Nov 29, 2023

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.

@drc38
Copy link
Owner

drc38 commented Dec 1, 2023

Try the latest release and see how you get on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants