Persistence of boiler srv attribute
This commit is contained in:
@@ -242,6 +242,14 @@ class VersatileThermostatBaseConfigFlow(FlowHandler):
|
|||||||
and infos.get(CONF_PRESENCE_SENSOR, None) is None
|
and infos.get(CONF_PRESENCE_SENSOR, None) is None
|
||||||
):
|
):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if self._infos[CONF_USE_CENTRAL_BOILER_FEATURE] and (
|
||||||
|
not self._infos.get(CONF_CENTRAL_BOILER_ACTIVATION_SRV, False)
|
||||||
|
or len(self._infos.get(CONF_CENTRAL_BOILER_ACTIVATION_SRV)) <= 0
|
||||||
|
or not self._infos.get(CONF_CENTRAL_BOILER_DEACTIVATION_SRV, False)
|
||||||
|
or len(self._infos.get(CONF_CENTRAL_BOILER_DEACTIVATION_SRV)) <= 0
|
||||||
|
):
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
if (
|
if (
|
||||||
infos.get(CONF_NAME) is None
|
infos.get(CONF_NAME) is None
|
||||||
@@ -857,6 +865,9 @@ class VersatileThermostatOptionsFlowHandler(
|
|||||||
if not self._infos[CONF_USE_PRESENCE_FEATURE]:
|
if not self._infos[CONF_USE_PRESENCE_FEATURE]:
|
||||||
self._infos[CONF_USE_PRESENCE_CENTRAL_CONFIG] = False
|
self._infos[CONF_USE_PRESENCE_CENTRAL_CONFIG] = False
|
||||||
self._infos[CONF_PRESENCE_SENSOR] = None
|
self._infos[CONF_PRESENCE_SENSOR] = None
|
||||||
|
if not self._infos[CONF_USE_CENTRAL_BOILER_FEATURE]:
|
||||||
|
self._infos[CONF_CENTRAL_BOILER_ACTIVATION_SRV] = None
|
||||||
|
self._infos[CONF_CENTRAL_BOILER_DEACTIVATION_SRV] = None
|
||||||
|
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
"Recreating entry %s due to configuration change. New config is now: %s",
|
"Recreating entry %s due to configuration change. New config is now: %s",
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ async def test_add_a_central_config(hass: HomeAssistant, skip_hass_states_is_sta
|
|||||||
assert api.nb_active_device_for_boiler_entity is None
|
assert api.nb_active_device_for_boiler_entity is None
|
||||||
assert api.nb_active_device_for_boiler is None
|
assert api.nb_active_device_for_boiler is None
|
||||||
|
|
||||||
assert api.nb_active_device_for_boiler_threshold_entity is not None
|
assert api.nb_active_device_for_boiler_threshold_entity is None
|
||||||
assert api.nb_active_device_for_boiler_threshold == 1 # the default value
|
assert api.nb_active_device_for_boiler_threshold is None
|
||||||
|
|
||||||
|
|
||||||
# @pytest.mark.parametrize("expected_lingering_tasks", [True])
|
# @pytest.mark.parametrize("expected_lingering_tasks", [True])
|
||||||
|
|||||||
Reference in New Issue
Block a user