Use OptionsFlowWithReload in honeywell (#149162)

This commit is contained in:
G Johansson 2025-07-21 12:47:38 +02:00 committed by GitHub
parent c22f65bd87
commit 94d077ea41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 11 deletions

View File

@ -83,18 +83,9 @@ async def async_setup_entry(
config_entry.runtime_data = HoneywellData(config_entry.entry_id, client, devices)
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
config_entry.async_on_unload(config_entry.add_update_listener(update_listener))
return True
async def update_listener(
hass: HomeAssistant, config_entry: HoneywellConfigEntry
) -> None:
"""Update listener."""
await hass.config_entries.async_reload(config_entry.entry_id)
async def async_unload_entry(
hass: HomeAssistant, config_entry: HoneywellConfigEntry
) -> bool:

View File

@ -12,7 +12,7 @@ from homeassistant.config_entries import (
ConfigEntry,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
OptionsFlowWithReload,
)
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import callback
@ -136,7 +136,7 @@ class HoneywellConfigFlow(ConfigFlow, domain=DOMAIN):
return HoneywellOptionsFlowHandler()
class HoneywellOptionsFlowHandler(OptionsFlow):
class HoneywellOptionsFlowHandler(OptionsFlowWithReload):
"""Config flow options for Honeywell."""
async def async_step_init(self, user_input=None) -> ConfigFlowResult: