You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HA made a change in HA 2024.05 and config.entry_id is no longer valid in the async_setup_platform() method. This results in an error when using YAML to configure a sensor. I ended up hacking together an ugly workaround. If you have a better way to address it, I'd love to copy it.
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:356
integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 6:17:27 PM (1 occurrences)
Last logged: 6:17:27 PM
Error while setting up nfl 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/nfl/sensor.py", line 40, in async_setup_platform
config.entry_id = slugify(f"{config.get(CONF_TEAM_ID)}")
^^^^^^^^^^^^^^^
AttributeError: 'NodeDictClass' object has no attribute 'entry_id'
The text was updated successfully, but these errors were encountered:
HA made a change in HA 2024.05 and
config.entry_id
is no longer valid in theasync_setup_platform()
method. This results in an error when using YAML to configure a sensor. I ended up hacking together an ugly workaround. If you have a better way to address it, I'd love to copy it.The text was updated successfully, but these errors were encountered: