Co-authored-by: Jean-Marc Collin <jean-marc.collin-extern@renault.com>
This commit is contained in:
@@ -915,7 +915,7 @@ class VersatileThermostatBaseConfigFlow(FlowHandler):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class VersatileThermostatConfigFlow(
|
class VersatileThermostatConfigFlow( # pylint: disable=abstract-method
|
||||||
VersatileThermostatBaseConfigFlow, HAConfigFlow, domain=DOMAIN
|
VersatileThermostatBaseConfigFlow, HAConfigFlow, domain=DOMAIN
|
||||||
):
|
):
|
||||||
"""Handle a config flow for Versatile Thermostat."""
|
"""Handle a config flow for Versatile Thermostat."""
|
||||||
@@ -929,6 +929,8 @@ class VersatileThermostatConfigFlow(
|
|||||||
@callback
|
@callback
|
||||||
def async_get_options_flow(config_entry: ConfigEntry):
|
def async_get_options_flow(config_entry: ConfigEntry):
|
||||||
"""Get options flow for this handler"""
|
"""Get options flow for this handler"""
|
||||||
|
# #713 doesn't work as explained here:https://developers.home-assistant.io/blog/2024/11/12/options-flow
|
||||||
|
# should be - return VersatileThermostatOptionsFlowHandler() but hass is not initialized
|
||||||
return VersatileThermostatOptionsFlowHandler(config_entry)
|
return VersatileThermostatOptionsFlowHandler(config_entry)
|
||||||
|
|
||||||
async def async_step_finalize(self, _):
|
async def async_step_finalize(self, _):
|
||||||
@@ -947,8 +949,12 @@ class VersatileThermostatOptionsFlowHandler(
|
|||||||
|
|
||||||
def __init__(self, config_entry: ConfigEntry) -> None:
|
def __init__(self, config_entry: ConfigEntry) -> None:
|
||||||
"""Initialize options flow."""
|
"""Initialize options flow."""
|
||||||
|
|
||||||
|
self._conf_app_id: str | None = None
|
||||||
|
|
||||||
super().__init__(config_entry.data.copy())
|
super().__init__(config_entry.data.copy())
|
||||||
self.config_entry = config_entry
|
# #713
|
||||||
|
# self.config_entry = config_entry
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"CTOR VersatileThermostatOptionsFlowHandler info: %s, entry_id: %s",
|
"CTOR VersatileThermostatOptionsFlowHandler info: %s, entry_id: %s",
|
||||||
self._infos,
|
self._infos,
|
||||||
|
|||||||
Reference in New Issue
Block a user