Use OptionsFlowWithReload in motion_blinds (#149070)

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

View File

@ -120,8 +120,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
entry.async_on_unload(entry.add_update_listener(update_listener))
return True
@ -145,8 +143,3 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
multicast.Stop_listen()
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)

View File

@ -12,7 +12,7 @@ from homeassistant.config_entries import (
ConfigEntry,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
OptionsFlowWithReload,
)
from homeassistant.const import CONF_API_KEY, CONF_HOST
from homeassistant.core import callback
@ -38,7 +38,7 @@ CONFIG_SCHEMA = vol.Schema(
)
class OptionsFlowHandler(OptionsFlow):
class OptionsFlowHandler(OptionsFlowWithReload):
"""Options for the component."""
async def async_step_init(