Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions homeassistant/components/denonavr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: DenonavrConfigEntry) ->
raise ConfigEntryNotReady from ex
receiver = connect_denonavr.receiver

entry.async_on_unload(entry.add_update_listener(update_listener))

entry.runtime_data = receiver

await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
Expand Down Expand Up @@ -100,10 +98,3 @@ async def async_unload_entry(
_LOGGER.debug("Removing zone3 from DenonAvr")

return unload_ok


async def update_listener(
hass: HomeAssistant, config_entry: DenonavrConfigEntry
) -> None:
"""Handle options update."""
await hass.config_entries.async_reload(config_entry.entry_id)
8 changes: 6 additions & 2 deletions homeassistant/components/denonavr/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
from denonavr.exceptions import AvrNetworkError, AvrTimoutError
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_HOST, CONF_MODEL, CONF_TYPE
from homeassistant.core import callback
from homeassistant.helpers.httpx_client import get_async_client
Expand Down Expand Up @@ -51,7 +55,7 @@
CONFIG_SCHEMA = vol.Schema({vol.Optional(CONF_HOST): str})


class OptionsFlowHandler(OptionsFlow):
class OptionsFlowHandler(OptionsFlowWithReload):
"""Options for the component."""

async def async_step_init(
Expand Down
7 changes: 0 additions & 7 deletions homeassistant/components/knx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

hass.data[KNX_MODULE_KEY] = knx_module

entry.async_on_unload(entry.add_update_listener(async_update_entry))

if CONF_KNX_EXPOSE in config:
for expose_config in config[CONF_KNX_EXPOSE]:
knx_module.exposures.append(
Expand Down Expand Up @@ -174,11 +172,6 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
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:
"""Remove a config entry."""

Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/knx/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
ConfigEntry,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
OptionsFlowWithReload,
)
from homeassistant.const import CONF_HOST, CONF_PORT
from homeassistant.core import callback
Expand Down Expand Up @@ -899,7 +899,7 @@ async def async_step_secure_key_source_menu_routing(
)


class KNXOptionsFlow(OptionsFlow):
class KNXOptionsFlow(OptionsFlowWithReload):
"""Handle KNX options."""

def __init__(self, config_entry: ConfigEntry) -> None:
Expand Down
Loading