mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Use OptionsFlowWithReload in jewish_calendar (#149121)
This commit is contained in:
parent
0c858de1af
commit
0d42b24467
@ -79,13 +79,6 @@ async def async_setup_entry(
|
||||
|
||||
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
|
||||
|
||||
async def update_listener(
|
||||
hass: HomeAssistant, config_entry: JewishCalendarConfigEntry
|
||||
) -> None:
|
||||
# Trigger update of states for all platforms
|
||||
await hass.config_entries.async_reload(config_entry.entry_id)
|
||||
|
||||
config_entry.async_on_unload(config_entry.add_update_listener(update_listener))
|
||||
return True
|
||||
|
||||
|
||||
|
@ -9,7 +9,11 @@ import zoneinfo
|
||||
from hdate.translator import Language
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult, OptionsFlow
|
||||
from homeassistant.config_entries import (
|
||||
ConfigFlow,
|
||||
ConfigFlowResult,
|
||||
OptionsFlowWithReload,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
CONF_ELEVATION,
|
||||
CONF_LANGUAGE,
|
||||
@ -124,7 +128,7 @@ class JewishCalendarConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
return self.async_update_reload_and_abort(reconfigure_entry, data=user_input)
|
||||
|
||||
|
||||
class JewishCalendarOptionsFlowHandler(OptionsFlow):
|
||||
class JewishCalendarOptionsFlowHandler(OptionsFlowWithReload):
|
||||
"""Handle Jewish Calendar options."""
|
||||
|
||||
async def async_step_init(
|
||||
|
Loading…
x
Reference in New Issue
Block a user