Use OptionsFlowWithReload in lamarzocco (#149119)

This commit is contained in:
G Johansson 2025-07-20 12:31:18 +02:00 committed by GitHub
parent 5d653d46c3
commit 0c858de1af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 9 deletions

View File

@ -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

View File

@ -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(