From 0ba25068df477e00691e5a40a01cc91e901a364b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Nenz=C3=A9n?= Date: Sun, 11 Aug 2024 19:30:15 +0200 Subject: [PATCH] Update __init__.py --- custom_components/wellbeing/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/wellbeing/__init__.py b/custom_components/wellbeing/__init__.py index d13f797..e64d16f 100644 --- a/custom_components/wellbeing/__init__.py +++ b/custom_components/wellbeing/__init__.py @@ -84,6 +84,11 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: return unloaded +async def async_reload_entry(hass: HomeAssistant, entry: ConfigEntry) -> None: + """Reload the config entry when it changed.""" + await hass.config_entries.async_reload(entry.entry_id) + + class WellbeingDataUpdateCoordinator(DataUpdateCoordinator): """Class to manage fetching data from the API."""