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

Fixes warning logged during Home Assistant start #73

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

slovdahl
Copy link
Contributor

See https://developers.home-assistant.io/blog/2024/06/12/async_forward_entry_setups/ for more information.

Fixes warnings like this:

2024-06-18 20:06:22.690 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'fmi' calls async_forward_entry_setup for integration, fmi with title: Bodö and entry_id: 2bd0b11d9f9c95f134faab9e4ddb03e8, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/fmi/__init__.py, line 72: hass.async_create_task(, please report it to the author of the 'fmi' custom integration

See https://developers.home-assistant.io/blog/2024/06/12/async_forward_entry_setups/
for more information.

Fixes warnings like this:

```
2024-06-18 20:06:22.690 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'fmi' calls async_forward_entry_setup for integration, fmi with title: Bodö and entry_id: 2bd0b11d9f9c95f134faab9e4ddb03e8, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/fmi/__init__.py, line 72: hass.async_create_task(, please report it to the author of the 'fmi' custom integration
```
for component in PLATFORMS:
await hass.config_entries.async_forward_entry_unload(config_entry, component)
await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)
Copy link
Contributor Author

@slovdahl slovdahl Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't fix any warning right now, but https://github.com/home-assistant/core/blob/9723b97f4bd42c850f5cb5fbf67ecdfc55769861/homeassistant/config_entries.py#L2175-L2182 says that async_unload_platforms is the preferred method nowadays.

bild

@slovdahl
Copy link
Contributor Author

Tested that it fixed the warning in my development instance.

@slovdahl
Copy link
Contributor Author

@cruwaller you maybe want to take a look when you have some time 🙂

@cruwaller
Copy link
Collaborator

Thanks a lot!
I will take a look in couple of days.

@cruwaller cruwaller merged commit 361c6fe into anand-p-r:master Jun 24, 2024
@slovdahl slovdahl deleted the fix-ha-warning branch June 25, 2024 05:42
@slovdahl
Copy link
Contributor Author

@cruwaller Any chance we could get a release with this fix included? 🙇

@cruwaller
Copy link
Collaborator

Yeah, let's include #72 as well and I will trigger a release 👍

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 this pull request may close these issues.

2 participants