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

Home Assistant 2024.9 compatibility (async_update_entry) #37

Open
nickolay opened this issue Aug 26, 2024 · 2 comments · May be fixed by #39
Open

Home Assistant 2024.9 compatibility (async_update_entry) #37

nickolay opened this issue Aug 26, 2024 · 2 comments · May be fixed by #39

Comments

@nickolay
Copy link

I've just installed this on 2024.7.4 and it works, but there's a warning:

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:184

Detected that custom integration 'favicon' sets "options" directly to update a config entry. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to use async_update_entry instead at custom_components/favicon/__init__.py, line 44: config_entry.options = config_entry.data, please report it to the author of the 'favicon' custom integration

https://developers.home-assistant.io/blog/2024/02/12/async_update_entry/

Just a heads-up.

@nkkm888
Copy link

nkkm888 commented Sep 13, 2024

same here:
WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'favicon' sets "options" directly to update a config entry. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to use async_update_entry instead at custom_components/favicon/init.py, line 44: config_entry.options = config_entry.data, please report it to the author of the 'favicon' custom integration

@tykeal
Copy link

tykeal commented Nov 20, 2024

Just installed this on a brand new 2024.11 and this is what I'm getting:

2024-11-20 10:50:12.865 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry  for favicon
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 635, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/favicon/__init__.py", line 44, in async_setup_entry
    config_entry.options = config_entry.data
    ^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 463, in __setattr__
    raise AttributeError(
AttributeError: options cannot be changed directly, use async_update_entry instead

As such the integration is failing to load or do any configuration :(

tykeal added a commit to tykeal/hass-favicon that referenced this issue Nov 21, 2024
Home Assistant 2024.9 requires the use of async_update_entry instead of
directly modifying the config_entry object. This change updates the code
to use the new method.

Fixes: thomasloven#37
Signed-off-by: Andrew Grimberg <[email protected]>
@tykeal tykeal linked a pull request Nov 21, 2024 that will close this issue
@tykeal tykeal mentioned this issue Jan 27, 2025
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

Successfully merging a pull request may close this issue.

3 participants