mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Use OptionsFlowWithReload in lamarzocco (#149119)
This commit is contained in:
parent
5d653d46c3
commit
0c858de1af
@ -154,13 +154,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: LaMarzoccoConfigEntry) -
|
|||||||
|
|
||||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||||
|
|
||||||
async def update_listener(
|
|
||||||
hass: HomeAssistant, entry: LaMarzoccoConfigEntry
|
|
||||||
) -> None:
|
|
||||||
await hass.config_entries.async_reload(entry.entry_id)
|
|
||||||
|
|
||||||
entry.async_on_unload(entry.add_update_listener(update_listener))
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ from homeassistant.config_entries import (
|
|||||||
SOURCE_RECONFIGURE,
|
SOURCE_RECONFIGURE,
|
||||||
ConfigFlow,
|
ConfigFlow,
|
||||||
ConfigFlowResult,
|
ConfigFlowResult,
|
||||||
OptionsFlow,
|
OptionsFlowWithReload,
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_ADDRESS,
|
CONF_ADDRESS,
|
||||||
@ -363,7 +363,7 @@ class LmConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
return LmOptionsFlowHandler()
|
return LmOptionsFlowHandler()
|
||||||
|
|
||||||
|
|
||||||
class LmOptionsFlowHandler(OptionsFlow):
|
class LmOptionsFlowHandler(OptionsFlowWithReload):
|
||||||
"""Handles options flow for the component."""
|
"""Handles options flow for the component."""
|
||||||
|
|
||||||
async def async_step_init(
|
async def async_step_init(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user