Use OptionsFlowWithReload in netgear (#149069)

This commit is contained in:
G Johansson
2025-07-19 16:37:37 +02:00
committed by GitHub
parent 7202203f35
commit 13434012e7
2 changed files with 2 additions and 9 deletions

View File

@ -61,8 +61,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
hass.data.setdefault(DOMAIN, {})
entry.async_on_unload(entry.add_update_listener(update_listener))
async def async_update_devices() -> bool:
"""Fetch data from the router."""
if router.track_devices:
@ -194,11 +192,6 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
return unload_ok
async def update_listener(hass: HomeAssistant, config_entry: ConfigEntry) -> None:
"""Handle options update."""
await hass.config_entries.async_reload(config_entry.entry_id)
async def async_remove_config_entry_device(
hass: HomeAssistant, config_entry: ConfigEntry, device_entry: dr.DeviceEntry
) -> bool:

View File

@ -13,7 +13,7 @@ from homeassistant.config_entries import (
ConfigEntry,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
OptionsFlowWithReload,
)
from homeassistant.const import (
CONF_HOST,
@ -65,7 +65,7 @@ def _ordered_shared_schema(schema_input):
}
class OptionsFlowHandler(OptionsFlow):
class OptionsFlowHandler(OptionsFlowWithReload):
"""Options for the component."""
async def async_step_init(