Skip to content

Commit

Permalink
Fix loading of platforms (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohNan authored Jul 7, 2024
1 parent 4b448ed commit e449e84
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit e449e84

Please sign in to comment.