-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
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'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels