From 1254ae71570b6be4936bca8b80f4932b4e2513fc Mon Sep 17 00:00:00 2001 From: Jules Dejaeghere Date: Sun, 29 Dec 2024 18:04:56 +0100 Subject: [PATCH] Use hass.config_entries.async_reload to reload config entry --- custom_components/irm_kmi/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/irm_kmi/__init__.py b/custom_components/irm_kmi/__init__.py index f7bb08a..14c05e2 100644 --- a/custom_components/irm_kmi/__init__.py +++ b/custom_components/irm_kmi/__init__.py @@ -45,8 +45,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: async def async_reload_entry(hass: HomeAssistant, entry: ConfigEntry) -> None: """Reload config entry.""" - await async_unload_entry(hass, entry) - await async_setup_entry(hass, entry) + await hass.config_entries.async_reload(entry.entry_id) async def async_migrate_entry(hass, config_entry: ConfigEntry):