Skip to content

Commit

Permalink
Merge pull request #43 from hawky358/Fix-async_add_job-and-async_forw…
Browse files Browse the repository at this point in the history
…ard_entry_setup-deprecation

Fix async_add_job and async_forward_entry_setup deprecation
  • Loading branch information
swartjean authored Nov 16, 2024
2 parents f141788 + a3b867c commit f35d6c1
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 f35d6c1

Please sign in to comment.