mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Use OptionsFlowWithReload in knx (#149097)
This commit is contained in:
parent
507f29a209
commit
1a6bfc0310
@ -120,8 +120,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
|
|
||||||
hass.data[KNX_MODULE_KEY] = knx_module
|
hass.data[KNX_MODULE_KEY] = knx_module
|
||||||
|
|
||||||
entry.async_on_unload(entry.add_update_listener(async_update_entry))
|
|
||||||
|
|
||||||
if CONF_KNX_EXPOSE in config:
|
if CONF_KNX_EXPOSE in config:
|
||||||
for expose_config in config[CONF_KNX_EXPOSE]:
|
for expose_config in config[CONF_KNX_EXPOSE]:
|
||||||
knx_module.exposures.append(
|
knx_module.exposures.append(
|
||||||
@ -174,11 +172,6 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
return unload_ok
|
return unload_ok
|
||||||
|
|
||||||
|
|
||||||
async def async_update_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
|
|
||||||
"""Update a given config entry."""
|
|
||||||
await hass.config_entries.async_reload(entry.entry_id)
|
|
||||||
|
|
||||||
|
|
||||||
async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
|
async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
|
||||||
"""Remove a config entry."""
|
"""Remove a config entry."""
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ from homeassistant.config_entries import (
|
|||||||
ConfigEntry,
|
ConfigEntry,
|
||||||
ConfigFlow,
|
ConfigFlow,
|
||||||
ConfigFlowResult,
|
ConfigFlowResult,
|
||||||
OptionsFlow,
|
OptionsFlowWithReload,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_HOST, CONF_PORT
|
from homeassistant.const import CONF_HOST, CONF_PORT
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
@ -899,7 +899,7 @@ class KNXConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class KNXOptionsFlow(OptionsFlow):
|
class KNXOptionsFlow(OptionsFlowWithReload):
|
||||||
"""Handle KNX options."""
|
"""Handle KNX options."""
|
||||||
|
|
||||||
def __init__(self, config_entry: ConfigEntry) -> None:
|
def __init__(self, config_entry: ConfigEntry) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user