Use OptionsFlowWithReload in vera (#149055)

This commit is contained in:
G Johansson 2025-07-19 16:48:23 +02:00 committed by GitHub
parent 22b35030a9
commit b9d19ffb29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 8 deletions

View File

@ -143,7 +143,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, stop_subscription)
)
entry.async_on_unload(entry.add_update_listener(_async_update_listener))
return True
@ -161,11 +160,6 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
return True
async def _async_update_listener(hass: HomeAssistant, entry: ConfigEntry) -> None:
"""Handle options update."""
await hass.config_entries.async_reload(entry.entry_id)
def map_vera_device(
vera_device: veraApi.VeraDevice, remap: list[int]
) -> Platform | None:

View File

@ -17,7 +17,7 @@ from homeassistant.config_entries import (
ConfigEntry,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
OptionsFlowWithReload,
)
from homeassistant.const import CONF_EXCLUDE, CONF_LIGHTS, CONF_SOURCE
from homeassistant.core import callback
@ -73,7 +73,7 @@ def options_data(user_input: dict[str, str]) -> dict[str, list[int]]:
)
class OptionsFlowHandler(OptionsFlow):
class OptionsFlowHandler(OptionsFlowWithReload):
"""Options for the component."""
async def async_step_init(