Skip to content

Commit

Permalink
Merge pull request #10 from kvanbiesen/patch-3
Browse files Browse the repository at this point in the history
Replace Add_job funtion with new async_create_task
  • Loading branch information
antibill51 authored May 15, 2024
2 parents ec6d0d8 + f3aecce commit 901632d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions custom_components/rika_firenet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
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)
)
entry.async_create_task(hass, hass.config_entries.async_forward_entry_setup(entry, platform))
entry.add_update_listener(async_reload_entry)
return True

Expand Down Expand Up @@ -86,4 +84,4 @@ async def async_reload_entry(hass: HomeAssistant, entry: ConfigEntry):

async def _async_options_updated(hass: HomeAssistant, entry: ConfigEntry):
"""Handle options update."""
await async_reload(hass, entry)
await async_reload(hass, entry)

0 comments on commit 901632d

Please sign in to comment.