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 with YAML Configuration with HA 2024.05 #49

Open
vasqued2 opened this issue May 20, 2024 · 0 comments
Open

Error with YAML Configuration with HA 2024.05 #49

vasqued2 opened this issue May 20, 2024 · 0 comments

Comments

@vasqued2
Copy link

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'
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

1 participant