Skip to content

Commit

Permalink
Fix async_add_job and async_forward_entry_setup deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
hawky358 committed Jul 9, 2024
1 parent f141788 commit a3b867c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions custom_components/eskom_loadshedding/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):

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

for platform in PLATFORMS:
if entry.options.get(platform, True):
coordinator.platforms.append(platform)
hass.async_add_job(
hass.config_entries.async_forward_entry_setup(entry, platform)
)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

if not entry.update_listeners:
entry.add_update_listener(async_reload_entry)
Expand Down

0 comments on commit a3b867c

Please sign in to comment.