finity69x2 / nws_alerts

An updated version of the nws_alerts custom integration for Home Assistant
84 stars 29 forks source link

AttributeError: 'NodeDictClass' object has no attribute 'entry_id' on startup #77

Closed rwifall closed 1 month ago

rwifall commented 3 months ago

Recently I have started getting an attribute error during nws_alerts startup that prevents it from starting. This happens every time I boot home assistant and prevents nws_alerts from working.

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:356
integration: Sensor (documentation, issues)
First occurred: May 17, 2024 at 11:13:19 PM (1 occurrences)
Last logged: May 17, 2024 at 11:13:19 PM

Error while setting up nws_alerts platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/nws_alerts/sensor.py", line 57, in async_setup_platform
    config.entry_id = slugify(f"{config.get(CONF_ZONE_ID)}")
    ^^^^^^^^^^^^^^^
AttributeError: 'NodeDictClass' object has no attribute 'entry_id'
rwifall commented 3 months ago

I deleted my YAML configuration and re-setup my sensors using the UI configuration and that seems to have solved this issue.

So it would appear that YAML configuration is broken.

finity69x2 commented 1 month ago

Yes, yaml configuration is indeed broken. There are no plans to make it work again either so it needs to be configured via the UI.

That has been indicated in the documentation as well.