From 536feac30ab69180724ed2540b9a8bd49746d076 Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Fri, 29 Dec 2023 11:06:48 +0100 Subject: [PATCH] implement reload service --- custom_components/easy_computer_manage/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/custom_components/easy_computer_manage/__init__.py b/custom_components/easy_computer_manage/__init__.py index 37f56e7..1424bea 100644 --- a/custom_components/easy_computer_manage/__init__.py +++ b/custom_components/easy_computer_manage/__init__.py @@ -67,3 +67,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ) return True + + +async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: + """Unload a config entry.""" + return await hass.config_entries.async_forward_entry_unload( + entry, "switch" + )