diff --git a/homeassistant/components/yalexs_ble/__init__.py b/homeassistant/components/yalexs_ble/__init__.py index 68d64494e41..4de1de5407c 100644 --- a/homeassistant/components/yalexs_ble/__init__.py +++ b/homeassistant/components/yalexs_ble/__init__.py @@ -129,24 +129,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: YALEXSBLEConfigEntry) -> entry.async_on_unload(push_lock.register_callback(_async_state_changed)) await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) - entry.async_on_unload(entry.add_update_listener(_async_update_listener)) entry.async_on_unload( hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _async_shutdown) ) return True -async def _async_update_listener( - hass: HomeAssistant, entry: YALEXSBLEConfigEntry -) -> None: - """Handle options update.""" - data = entry.runtime_data - if entry.title != data.title or data.always_connected != entry.options.get( - CONF_ALWAYS_CONNECTED - ): - await hass.config_entries.async_reload(entry.entry_id) - - async def async_unload_entry(hass: HomeAssistant, entry: YALEXSBLEConfigEntry) -> bool: """Unload a config entry.""" return await hass.config_entries.async_unload_platforms(entry, PLATFORMS) diff --git a/homeassistant/components/yalexs_ble/config_flow.py b/homeassistant/components/yalexs_ble/config_flow.py index 0e1eabdf6b2..0fbb1e3beb1 100644 --- a/homeassistant/components/yalexs_ble/config_flow.py +++ b/homeassistant/components/yalexs_ble/config_flow.py @@ -26,7 +26,7 @@ from homeassistant.config_entries import ( ConfigEntry, ConfigFlow, ConfigFlowResult, - OptionsFlow, + OptionsFlowWithReload, ) from homeassistant.const import CONF_ADDRESS from homeassistant.core import callback @@ -315,7 +315,7 @@ class YalexsConfigFlow(ConfigFlow, domain=DOMAIN): return YaleXSBLEOptionsFlowHandler() -class YaleXSBLEOptionsFlowHandler(OptionsFlow): +class YaleXSBLEOptionsFlowHandler(OptionsFlowWithReload): """Handle YaleXSBLE options.""" async def async_step_init(