From f3aecce767ee3ccd7616b0873fd84ed7dfcf83b8 Mon Sep 17 00:00:00 2001 From: kvanbiesen Date: Wed, 15 May 2024 10:02:21 +0200 Subject: [PATCH] Replace Add_job funtion with new async_create_task --- custom_components/rika_firenet/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/custom_components/rika_firenet/__init__.py b/custom_components/rika_firenet/__init__.py index 3e62979..470cddd 100755 --- a/custom_components/rika_firenet/__init__.py +++ b/custom_components/rika_firenet/__init__.py @@ -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 @@ -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) \ No newline at end of file + await async_reload(hass, entry)