1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Use automatic reload options flow in systemmonitor (#153107)

This commit is contained in:
G Johansson
2025-09-27 20:50:14 +02:00
committed by GitHub
parent b304bd1a8b
commit c9a301d50e
2 changed files with 2 additions and 6 deletions

View File

@@ -56,7 +56,6 @@ async def async_setup_entry(
entry.runtime_data = SystemMonitorData(coordinator, psutil_wrapper)
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
entry.async_on_unload(entry.add_update_listener(update_listener))
return True
@@ -67,11 +66,6 @@ async def async_unload_entry(
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
async def update_listener(hass: HomeAssistant, entry: SystemMonitorConfigEntry) -> None:
"""Handle options update."""
await hass.config_entries.async_reload(entry.entry_id)
async def async_migrate_entry(
hass: HomeAssistant, entry: SystemMonitorConfigEntry
) -> bool:

View File

@@ -92,6 +92,8 @@ class SystemMonitorConfigFlowHandler(SchemaConfigFlowHandler, domain=DOMAIN):
config_flow = CONFIG_FLOW
options_flow = OPTIONS_FLOW
options_flow_reloads = True
VERSION = 1
MINOR_VERSION = 3