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

Fix loading of platforms #61

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions custom_components/pollenprognos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):

hass.data[DOMAIN][entry.entry_id] = coordinator

enabled_platforms = (platform for platform in PLATFORMS if entry.options.get(platform, True))
for platform in enabled_platforms:
for platform in PLATFORMS:
coordinator.platforms.append(platform)

await hass.config_entries.async_forward_entry_setups(entry, enabled_platforms)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

entry.add_update_listener(async_reload_entry)
return True
Expand Down
Loading