Compare commits

..

4 Commits

Author SHA1 Message Date
Jean-Marc Collin 36fe361ad0 Fix signature send_percent_open 2025-02-12 13:17:04 +00:00
Jean-Marc Collin b8e5275cf9 Sonoff TRVZB workaround to the 'hvac_action' always Idle issue
Fixes #902
2025-02-12 13:10:34 +00:00
Jean-Marc Collin 35270f1394 Release 7.2.2 2025-02-10 17:07:28 +00:00
Jean-Marc Collin ce4acab908 Issue #902 - Sonoff TRVZB workaround to the 'hvac_action' always Idle issue 2025-02-10 17:06:26 +00:00
43 changed files with 43 additions and 344 deletions
@@ -104,7 +104,6 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
"last_temperature_datetime", "last_temperature_datetime",
"last_ext_temperature_datetime", "last_ext_temperature_datetime",
"minimal_activation_delay_sec", "minimal_activation_delay_sec",
"minimal_deactivation_delay_sec",
"last_update_datetime", "last_update_datetime",
"timezone", "timezone",
"temperature_unit", "temperature_unit",
@@ -371,7 +370,6 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
self._tpi_coef_ext = 0 self._tpi_coef_ext = 0
self._minimal_activation_delay = entry_infos.get(CONF_MINIMAL_ACTIVATION_DELAY) self._minimal_activation_delay = entry_infos.get(CONF_MINIMAL_ACTIVATION_DELAY)
self._minimal_deactivation_delay = entry_infos.get(CONF_MINIMAL_DEACTIVATION_DELAY, 0)
self._last_temperature_measure = self.now self._last_temperature_measure = self.now
self._last_ext_temperature_measure = self.now self._last_ext_temperature_measure = self.now
@@ -1686,7 +1684,6 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
self._current_tz self._current_tz
).isoformat(), ).isoformat(),
"minimal_activation_delay_sec": self._minimal_activation_delay, "minimal_activation_delay_sec": self._minimal_activation_delay,
"minimal_deactivation_delay_sec": self._minimal_deactivation_delay,
ATTR_TOTAL_ENERGY: self.total_energy, ATTR_TOTAL_ENERGY: self.total_energy,
"last_update_datetime": self.now.isoformat(), "last_update_datetime": self.now.isoformat(),
"timezone": str(self._current_tz), "timezone": str(self._current_tz),
@@ -371,12 +371,6 @@ class VersatileThermostatBaseConfigFlow(FlowHandler):
): ):
return False return False
if (
infos.get(CONF_USE_ADVANCED_CENTRAL_CONFIG, False) is False
and infos.get(CONF_MINIMAL_DEACTIVATION_DELAY, -1) == -1
):
return False
if ( if (
infos.get(CONF_PROP_FUNCTION, None) == PROPORTIONAL_FUNCTION_TPI infos.get(CONF_PROP_FUNCTION, None) == PROPORTIONAL_FUNCTION_TPI
and infos.get(CONF_USE_TPI_CENTRAL_CONFIG, False) is False and infos.get(CONF_USE_TPI_CENTRAL_CONFIG, False) is False
@@ -374,7 +374,6 @@ STEP_PRESENCE_DATA_SCHEMA = vol.Schema( # pylint: disable=invalid-name
STEP_CENTRAL_ADVANCED_DATA_SCHEMA = vol.Schema( # pylint: disable=invalid-name STEP_CENTRAL_ADVANCED_DATA_SCHEMA = vol.Schema( # pylint: disable=invalid-name
{ {
vol.Required(CONF_MINIMAL_ACTIVATION_DELAY, default=10): cv.positive_int, vol.Required(CONF_MINIMAL_ACTIVATION_DELAY, default=10): cv.positive_int,
vol.Required(CONF_MINIMAL_DEACTIVATION_DELAY, default=0): cv.positive_int,
vol.Required(CONF_SAFETY_DELAY_MIN, default=60): cv.positive_int, vol.Required(CONF_SAFETY_DELAY_MIN, default=60): cv.positive_int,
vol.Required( vol.Required(
CONF_SAFETY_MIN_ON_PERCENT, CONF_SAFETY_MIN_ON_PERCENT,
@@ -83,7 +83,6 @@ CONF_TPI_COEF_EXT = "tpi_coef_ext"
CONF_PRESENCE_SENSOR = "presence_sensor_entity_id" CONF_PRESENCE_SENSOR = "presence_sensor_entity_id"
CONF_PRESET_POWER = "power_temp" CONF_PRESET_POWER = "power_temp"
CONF_MINIMAL_ACTIVATION_DELAY = "minimal_activation_delay" CONF_MINIMAL_ACTIVATION_DELAY = "minimal_activation_delay"
CONF_MINIMAL_DEACTIVATION_DELAY = "minimal_deactivation_delay"
CONF_TEMP_MIN = "temp_min" CONF_TEMP_MIN = "temp_min"
CONF_TEMP_MAX = "temp_max" CONF_TEMP_MAX = "temp_max"
CONF_SAFETY_DELAY_MIN = "safety_delay_min" CONF_SAFETY_DELAY_MIN = "safety_delay_min"
@@ -290,7 +289,6 @@ ALL_CONF = (
CONF_TPI_COEF_EXT, CONF_TPI_COEF_EXT,
CONF_PRESENCE_SENSOR, CONF_PRESENCE_SENSOR,
CONF_MINIMAL_ACTIVATION_DELAY, CONF_MINIMAL_ACTIVATION_DELAY,
CONF_MINIMAL_DEACTIVATION_DELAY,
CONF_TEMP_MIN, CONF_TEMP_MIN,
CONF_TEMP_MAX, CONF_TEMP_MAX,
CONF_SAFETY_DELAY_MIN, CONF_SAFETY_DELAY_MIN,
@@ -14,6 +14,6 @@
"quality_scale": "silver", "quality_scale": "silver",
"requirements": [], "requirements": [],
"ssdp": [], "ssdp": [],
"version": "7.2.1", "version": "7.2.2",
"zeroconf": [] "zeroconf": []
} }
@@ -30,20 +30,18 @@ class PropAlgorithm:
tpi_coef_ext, tpi_coef_ext,
cycle_min: int, cycle_min: int,
minimal_activation_delay: int, minimal_activation_delay: int,
minimal_deactivation_delay: int,
vtherm_entity_id: str = None, vtherm_entity_id: str = None,
max_on_percent: float = None, max_on_percent: float = None,
) -> None: ) -> None:
"""Initialisation of the Proportional Algorithm""" """Initialisation of the Proportional Algorithm"""
_LOGGER.debug( _LOGGER.debug(
"%s - Creation new PropAlgorithm function_type: %s, tpi_coef_int: %s, tpi_coef_ext: %s, cycle_min:%d, minimal_activation_delay:%d, minimal_deactivation_delay:%d", # pylint: disable=line-too-long "%s - Creation new PropAlgorithm function_type: %s, tpi_coef_int: %s, tpi_coef_ext: %s, cycle_min:%d, minimal_activation_delay:%d", # pylint: disable=line-too-long
vtherm_entity_id, vtherm_entity_id,
function_type, function_type,
tpi_coef_int, tpi_coef_int,
tpi_coef_ext, tpi_coef_ext,
cycle_min, cycle_min,
minimal_activation_delay, minimal_activation_delay,
minimal_deactivation_delay,
) )
# Issue 506 - check parameters # Issue 506 - check parameters
@@ -53,11 +51,10 @@ class PropAlgorithm:
or not is_number(tpi_coef_ext) or not is_number(tpi_coef_ext)
or not is_number(cycle_min) or not is_number(cycle_min)
or not is_number(minimal_activation_delay) or not is_number(minimal_activation_delay)
or not is_number(minimal_deactivation_delay)
or function_type != PROPORTIONAL_FUNCTION_TPI or function_type != PROPORTIONAL_FUNCTION_TPI
): ):
_LOGGER.error( _LOGGER.error(
"%s - configuration is wrong. function_type=%s, entity_id is %s, tpi_coef_int is %s, tpi_coef_ext is %s, cycle_min is %s, minimal_activation_delay is %s, minimal_deactivation_delay is %s", "%s - configuration is wrong. function_type=%s, entity_id is %s, tpi_coef_int is %s, tpi_coef_ext is %s, cycle_min is %s, minimal_activation_delay is %s",
vtherm_entity_id, vtherm_entity_id,
function_type, function_type,
vtherm_entity_id, vtherm_entity_id,
@@ -65,7 +62,6 @@ class PropAlgorithm:
tpi_coef_ext, tpi_coef_ext,
cycle_min, cycle_min,
minimal_activation_delay, minimal_activation_delay,
minimal_deactivation_delay,
) )
raise TypeError( raise TypeError(
"TPI parameters are not set correctly. VTherm will not work as expected. Please reconfigure it correctly. See previous log for values" "TPI parameters are not set correctly. VTherm will not work as expected. Please reconfigure it correctly. See previous log for values"
@@ -77,7 +73,6 @@ class PropAlgorithm:
self._tpi_coef_ext = tpi_coef_ext self._tpi_coef_ext = tpi_coef_ext
self._cycle_min = cycle_min self._cycle_min = cycle_min
self._minimal_activation_delay = minimal_activation_delay self._minimal_activation_delay = minimal_activation_delay
self._minimal_deactivation_delay = minimal_deactivation_delay
self._on_percent = 0 self._on_percent = 0
self._calculated_on_percent = 0 self._calculated_on_percent = 0
self._on_time_sec = 0 self._on_time_sec = 0
@@ -192,18 +187,6 @@ class PropAlgorithm:
self._off_time_sec = self._cycle_min * 60 - self._on_time_sec self._off_time_sec = self._cycle_min * 60 - self._on_time_sec
# Do not stop heating when off time less than xx sec
if self._off_time_sec < self._minimal_deactivation_delay:
if self._off_time_sec > 0:
_LOGGER.info(
"%s - Force 100%% heating cycle since the off duration (%f) is shorter than minimal_deactivation_delay (%f)",
self._vtherm_entity_id,
self._off_time_sec,
self._minimal_deactivation_delay,
)
self._on_time_sec = self._cycle_min * 60
self._off_time_sec = 0
def set_safety(self, default_on_percent: float): def set_safety(self, default_on_percent: float):
"""Set a default value for on_percent (used for safety mode)""" """Set a default value for on_percent (used for safety mode)"""
_LOGGER.info( _LOGGER.info(
@@ -199,7 +199,6 @@
"description": "Configuration of advanced parameters. Leave the default values if you don't know what you are doing.\nThese parameters can lead to very poor temperature control or bad power regulation&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)", "description": "Configuration of advanced parameters. Leave the default values if you don't know what you are doing.\nThese parameters can lead to very poor temperature control or bad power regulation&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)",
"data": { "data": {
"minimal_activation_delay": "Minimum activation delay", "minimal_activation_delay": "Minimum activation delay",
"minimal_deactivation_delay": "Minimum deactivation delay",
"safety_delay_min": "Safety delay (in minutes)", "safety_delay_min": "Safety delay (in minutes)",
"safety_min_on_percent": "Minimum power percent to enable safety mode", "safety_min_on_percent": "Minimum power percent to enable safety mode",
"safety_default_on_percent": "Power percent to use in safety mode", "safety_default_on_percent": "Power percent to use in safety mode",
@@ -207,7 +206,6 @@
}, },
"data_description": { "data_description": {
"minimal_activation_delay": "Delay in seconds under which the equipment will not be activated", "minimal_activation_delay": "Delay in seconds under which the equipment will not be activated",
"minimal_deactivation_delay": "Delay in seconds under which the equipment will be kept active",
"safety_delay_min": "Maximum allowed delay in minutes between two temperature measurements. Above this delay the thermostat will turn to a safety off state", "safety_delay_min": "Maximum allowed delay in minutes between two temperature measurements. Above this delay the thermostat will turn to a safety off state",
"safety_min_on_percent": "Minimum heating percent value for safety preset activation. Below this amount of power percent the thermostat won't go into safety preset", "safety_min_on_percent": "Minimum heating percent value for safety preset activation. Below this amount of power percent the thermostat won't go into safety preset",
"safety_default_on_percent": "The default heating power percent value in safety preset. Set to 0 to switch off heater in safety preset", "safety_default_on_percent": "The default heating power percent value in safety preset. Set to 0 to switch off heater in safety preset",
@@ -453,7 +451,6 @@
"description": "Configuration of advanced parameters. Leave the default values if you don't know what you are doing.\nThese parameters can lead to very poor temperature control or bad power regulation&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)", "description": "Configuration of advanced parameters. Leave the default values if you don't know what you are doing.\nThese parameters can lead to very poor temperature control or bad power regulation&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)",
"data": { "data": {
"minimal_activation_delay": "Minimum activation delay", "minimal_activation_delay": "Minimum activation delay",
"minimal_deactivation_delay": "Minimum deactivation delay",
"safety_delay_min": "Safety delay (in minutes)", "safety_delay_min": "Safety delay (in minutes)",
"safety_min_on_percent": "Minimum power percent to enable safety mode", "safety_min_on_percent": "Minimum power percent to enable safety mode",
"safety_default_on_percent": "Power percent to use in safety mode", "safety_default_on_percent": "Power percent to use in safety mode",
@@ -461,7 +458,6 @@
}, },
"data_description": { "data_description": {
"minimal_activation_delay": "Delay in seconds under which the equipment will not be activated", "minimal_activation_delay": "Delay in seconds under which the equipment will not be activated",
"minimal_deactivation_delay": "Delay in seconds under which the equipment will be kept active",
"safety_delay_min": "Maximum allowed delay in minutes between two temperature measurements. Above this delay the thermostat will turn to a safety off state", "safety_delay_min": "Maximum allowed delay in minutes between two temperature measurements. Above this delay the thermostat will turn to a safety off state",
"safety_min_on_percent": "Minimum heating percent value for safety preset activation. Below this amount of power percent the thermostat won't go into safety preset", "safety_min_on_percent": "Minimum heating percent value for safety preset activation. Below this amount of power percent the thermostat won't go into safety preset",
"safety_default_on_percent": "The default heating power percent value in safety preset. Set to 0 to switch off heater in safety preset", "safety_default_on_percent": "The default heating power percent value in safety preset. Set to 0 to switch off heater in safety preset",
@@ -82,7 +82,6 @@ class ThermostatOverClimateValve(ThermostatOverClimate):
self._tpi_coef_ext, self._tpi_coef_ext,
self._cycle_min, self._cycle_min,
self._minimal_activation_delay, self._minimal_activation_delay,
self._minimal_deactivation_delay,
self.name, self.name,
) )
@@ -77,7 +77,6 @@ class ThermostatOverSwitch(BaseThermostat[UnderlyingSwitch]):
self._tpi_coef_ext, self._tpi_coef_ext,
self._cycle_min, self._cycle_min,
self._minimal_activation_delay, self._minimal_activation_delay,
self._minimal_deactivation_delay,
self.name, self.name,
max_on_percent=self._max_on_percent, max_on_percent=self._max_on_percent,
) )
@@ -96,7 +96,6 @@ class ThermostatOverValve(BaseThermostat[UnderlyingValve]): # pylint: disable=a
self._tpi_coef_ext, self._tpi_coef_ext,
self._cycle_min, self._cycle_min,
self._minimal_activation_delay, self._minimal_activation_delay,
self._minimal_deactivation_delay,
self.name, self.name,
max_on_percent=self._max_on_percent, max_on_percent=self._max_on_percent,
) )
@@ -199,7 +199,6 @@
"description": "Configuration of advanced parameters. Leave the default values if you don't know what you are doing.\nThese parameters can lead to very poor temperature control or bad power regulation&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)", "description": "Configuration of advanced parameters. Leave the default values if you don't know what you are doing.\nThese parameters can lead to very poor temperature control or bad power regulation&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)",
"data": { "data": {
"minimal_activation_delay": "Minimum activation delay", "minimal_activation_delay": "Minimum activation delay",
"minimal_deactivation_delay": "Minimal deactivation delay",
"safety_delay_min": "Safety delay (in minutes)", "safety_delay_min": "Safety delay (in minutes)",
"safety_min_on_percent": "Minimum power percent to enable safety mode", "safety_min_on_percent": "Minimum power percent to enable safety mode",
"safety_default_on_percent": "Power percent to use in safety mode", "safety_default_on_percent": "Power percent to use in safety mode",
@@ -207,7 +206,6 @@
}, },
"data_description": { "data_description": {
"minimal_activation_delay": "Delay in seconds under which the equipment will not be activated", "minimal_activation_delay": "Delay in seconds under which the equipment will not be activated",
"minimal_deactivation_delay": "Delay in seconds under which the equipment will be kept active",
"safety_delay_min": "Maximum allowed delay in minutes between two temperature measurements. Above this delay the thermostat will turn to a safety off state", "safety_delay_min": "Maximum allowed delay in minutes between two temperature measurements. Above this delay the thermostat will turn to a safety off state",
"safety_min_on_percent": "Minimum heating percent value for safety preset activation. Below this amount of power percent the thermostat won't go into safety preset", "safety_min_on_percent": "Minimum heating percent value for safety preset activation. Below this amount of power percent the thermostat won't go into safety preset",
"safety_default_on_percent": "The default heating power percent value in safety preset. Set to 0 to switch off heater in safety preset", "safety_default_on_percent": "The default heating power percent value in safety preset. Set to 0 to switch off heater in safety preset",
@@ -200,7 +200,6 @@
"description": "Configuration des paramètres avancés. Laissez les valeurs par défaut si vous ne savez pas ce que vous faites.\nCes paramètres peuvent induire des mauvais comportements du thermostat&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-advanced.md)", "description": "Configuration des paramètres avancés. Laissez les valeurs par défaut si vous ne savez pas ce que vous faites.\nCes paramètres peuvent induire des mauvais comportements du thermostat&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-advanced.md)",
"data": { "data": {
"minimal_activation_delay": "Délai minimal d'activation", "minimal_activation_delay": "Délai minimal d'activation",
"minimal_deactivation_delay": "Délai de désactivation minimal",
"safety_delay_min": "Délai maximal entre 2 mesures de températures", "safety_delay_min": "Délai maximal entre 2 mesures de températures",
"safety_min_on_percent": "Pourcentage minimal de puissance", "safety_min_on_percent": "Pourcentage minimal de puissance",
"safety_default_on_percent": "Pourcentage de puissance a utiliser en mode securité", "safety_default_on_percent": "Pourcentage de puissance a utiliser en mode securité",
@@ -208,7 +207,6 @@
}, },
"data_description": { "data_description": {
"minimal_activation_delay": "Délai en secondes en-dessous duquel l'équipement ne sera pas activé", "minimal_activation_delay": "Délai en secondes en-dessous duquel l'équipement ne sera pas activé",
"minimal_deactivation_delay": "Délai en secondes en-dessous duquel l'équipement se laissé actif",
"safety_delay_min": "Délai maximal autorisé en minutes entre 2 mesures de températures. Au-dessus de ce délai, le thermostat se mettra en position de sécurité", "safety_delay_min": "Délai maximal autorisé en minutes entre 2 mesures de températures. Au-dessus de ce délai, le thermostat se mettra en position de sécurité",
"safety_min_on_percent": "Seuil minimal de pourcentage de chauffage en-dessous duquel le préréglage sécurité ne sera jamais activé", "safety_min_on_percent": "Seuil minimal de pourcentage de chauffage en-dessous duquel le préréglage sécurité ne sera jamais activé",
"safety_default_on_percent": "Valeur par défaut pour le pourcentage de chauffage en mode sécurité. Mettre 0 pour éteindre le radiateur en mode sécurité", "safety_default_on_percent": "Valeur par défaut pour le pourcentage de chauffage en mode sécurité. Mettre 0 pour éteindre le radiateur en mode sécurité",
@@ -450,15 +448,13 @@
"description": "Configuration des paramètres avancés. Laissez les valeurs par défaut si vous ne savez pas ce que vous faites.\nCes paramètres peuvent induire des mauvais comportements du thermostat&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-advanced.md)", "description": "Configuration des paramètres avancés. Laissez les valeurs par défaut si vous ne savez pas ce que vous faites.\nCes paramètres peuvent induire des mauvais comportements du thermostat&nbsp;[![?](https://img.icons8.com/color/18/help.png)](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-advanced.md)",
"data": { "data": {
"minimal_activation_delay": "Délai minimal d'activation", "minimal_activation_delay": "Délai minimal d'activation",
"minimal_deactivation_delay": "Délai de désactivation minimal",
"safety_delay_min": "Délai maximal entre 2 mesures de températures", "safety_delay_min": "Délai maximal entre 2 mesures de températures",
"safety_min_on_percent": "Pourcentage minimal de puissance", "safety_min_on_percent": "Pourcentage minimal de puissance",
"safety_default_on_percent": "Pourcentage de puissance a utiliser en mode securité", "safety_default_on_percent": "Pourcentage de puissance a utiliser en mode securité",
"use_advanced_central_config": "Utiliser la configuration centrale avancée" "use_advanced_central_config": "Utiliser la configuration centrale avancée"
}, },
"data_description": { "data_description": {
"minimal_activation_delay": "Délai en secondes en-dessous duquel l'équipement ne sera pas activé", "minimal_activation_delay": "Délai en seondes en-dessous duquel l'équipement ne sera pas activé",
"minimal_deactivation_delay": "Délai en secondes en-dessous duquel l'équipement se laissé actif",
"safety_delay_min": "Délai maximal autorisé en minutes entre 2 mesures de températures. Au-dessus de ce délai, le thermostat se mettra en position de sécurité", "safety_delay_min": "Délai maximal autorisé en minutes entre 2 mesures de températures. Au-dessus de ce délai, le thermostat se mettra en position de sécurité",
"safety_min_on_percent": "Seuil minimal de pourcentage de chauffage en-dessous duquel le préréglage sécurité ne sera jamais activé", "safety_min_on_percent": "Seuil minimal de pourcentage de chauffage en-dessous duquel le préréglage sécurité ne sera jamais activé",
"safety_default_on_percent": "Valeur par défaut pour le pourcentage de chauffage en mode sécurité. Mettre 0 pour éteindre le radiateur en mode sécurité", "safety_default_on_percent": "Valeur par défaut pour le pourcentage de chauffage en mode sécurité. Mettre 0 pour éteindre le radiateur en mode sécurité",
@@ -968,10 +968,10 @@ class UnderlyingValve(UnderlyingEntity):
# This could happens in unit test if input_number domain is not yet loaded # This could happens in unit test if input_number domain is not yet loaded
# raise err # raise err
async def send_percent_open(self): async def send_percent_open(self, fixed_value: float = None):
"""Send the percent open to the underlying valve""" """Send the percent open to the underlying valve"""
# This may fails if called after shutdown # This may fails if called after shutdown
return await self._send_value_to_number(self._entity_id, self._percent_open) return await self._send_value_to_number(self._entity_id, self._percent_open if fixed_value is None else fixed_value)
async def turn_off(self): async def turn_off(self):
"""Turn heater toggleable device off.""" """Turn heater toggleable device off."""
@@ -1108,7 +1108,15 @@ class UnderlyingValveRegulation(UnderlyingValve):
self._max_offset_calibration: float = None self._max_offset_calibration: float = None
self._min_opening_degree: int = min_opening_degree self._min_opening_degree: int = min_opening_degree
async def send_percent_open(self): def _normalize_opening_closing_degree(self, opening: float) -> float:
"""Issue #902 - Normalize the opening and closing degree"""
new_opening = max(opening - 1, 0)
new_closing = max(self._max_opening_degree - 1 - new_opening, 0)
return new_opening, new_closing
async def send_percent_open(self, _: float = None):
"""Send the percent open to the underlying valve""" """Send the percent open to the underlying valve"""
if not self._is_min_max_initialized: if not self._is_min_max_initialized:
_LOGGER.debug( _LOGGER.debug(
@@ -1150,16 +1158,16 @@ class UnderlyingValveRegulation(UnderlyingValve):
else: else:
self._percent_open = 0 self._percent_open = 0
# Send opening_degree
await super().send_percent_open()
# Send closing_degree if set # Send closing_degree if set
closing_degree = None opening_degree, closing_degree = self._normalize_opening_closing_degree(self._percent_open)
# We should not change the _percent_open because it is used to check if value has bchanged
# self._percent_open = opening_degree
# Send opening_degree
await super().send_percent_open(opening_degree)
if self.have_closing_degree_entity: if self.have_closing_degree_entity:
await self._send_value_to_number( await self._send_value_to_number(self._closing_degree_entity_id, closing_degree)
self._closing_degree_entity_id,
closing_degree := self._max_opening_degree - self._percent_open,
)
# send offset_calibration to the difference between target temp and local temp # send offset_calibration to the difference between target temp and local temp
offset = None offset = None
-4
View File
@@ -25,10 +25,6 @@ The advanced configuration form looks like this:
The first delay (`minimal_activation_delay_sec`) in seconds is the minimum acceptable delay to turn on the heating. If the calculated activation time is shorter than this value, the heating remains off. This parameter only applies to _VTherm_ with cyclic triggering `over_switch`. If the activation time is too short, rapid switching will not allow the device to heat up properly. The first delay (`minimal_activation_delay_sec`) in seconds is the minimum acceptable delay to turn on the heating. If the calculated activation time is shorter than this value, the heating remains off. This parameter only applies to _VTherm_ with cyclic triggering `over_switch`. If the activation time is too short, rapid switching will not allow the device to heat up properly.
### Minimum Deactivation Delay
The delay (`minimal_deactivation_delay_sec`) in seconds is the minimum acceptable delay to turn off the heating. If the calculated deactivation time is shorter than this value, the heating remains on.
### Safety Mode ### Safety Mode
The second delay (`safety_delay_min`) is the maximum time between two temperature measurements before the _VTherm_ switches to Safety Mode. The second delay (`safety_delay_min`) is the maximum time between two temperature measurements before the _VTherm_ switches to Safety Mode.
-16
View File
@@ -7,7 +7,6 @@ This page outlines the steps to quickly set up a basic yet operational _VTherm_.
- [Heatzy, eCosy, or similar (`climate` entity)](#heatzy-ecosy-or-similar-climate-entity) - [Heatzy, eCosy, or similar (`climate` entity)](#heatzy-ecosy-or-similar-climate-entity)
- [Simple switch such as Aqara T1, Nous B2Z, Sonoff ZBMini, Sonoff POW, ...](#simple-switch-such-as-aqara-t1-nous-b2z-sonoff-zbmini-sonoff-pow-) - [Simple switch such as Aqara T1, Nous B2Z, Sonoff ZBMini, Sonoff POW, ...](#simple-switch-such-as-aqara-t1-nous-b2z-sonoff-zbmini-sonoff-pow-)
- [Sonoff TRVZB or similar (TRV with valve control)](#sonoff-trvzb-or-similar-trv-with-valve-control) - [Sonoff TRVZB or similar (TRV with valve control)](#sonoff-trvzb-or-similar-trv-with-valve-control)
- [Reversible HP Units, Air Conditioning, or Devices Controlled via a `climate` Entity](#reversible-hp-units-air-conditioning-or-devices-controlled-via-a-climate-entity)
- [Next Steps](#next-steps) - [Next Steps](#next-steps)
- [Call for Contributions](#call-for-contributions) - [Call for Contributions](#call-for-contributions)
@@ -71,21 +70,6 @@ For this to work, the `closing degree` must be set to the maximum (100%). Do not
After completing these five steps, you will have a fully functional _VTherm_ that controls your Sonoff TRVZB or similar device. After completing these five steps, you will have a fully functional _VTherm_ that controls your Sonoff TRVZB or similar device.
## Reversible HP Units, Air Conditioning, or Devices Controlled via a `climate` Entity
Reversible heat pumps (HP) or similar devices are represented in _HA_ as a `climate` entity, allowing you to select the heating preset or mode (Heat / Cool / Off).)
_VTherm_ will regulate the temperature by controlling the target temperature and mode of the device through commands sent to the underlying `climate` entity.
To integrate it into _VTherm_, you need to:
1. Create a _VTherm_ of type `over_climate`. See [creating a _VTherm_](creation.md),
2. Assign it the main attributes (name, room temperature sensor, and outdoor temperature sensor at minimum). See [main attributes](base-attributes.md),
3. Define one or more underlying devices to control. The underlying entity here is the `climate` entity that manages the heat pump or air conditioner. See [underlying devices](over-climate.md),
After these three steps, you will have a fully operational _VTherm_ to control your heat pump, air conditioner, or similar device.
To go further, self-regulation may be necessary depending on how well your device operates. Self-regulation involves _VTherm_ slightly adjusting the target temperature to encourage the device to heat or cool more or less until the desired setpoint is reached. Self-regulation is explained in detail here: [self-regulation](self-regulation.md).
# Next Steps # Next Steps
Once created, you need to configure the preset temperatures. See [presets](feature-presets.md) for a minimal configuration. Once created, you need to configure the preset temperatures. See [presets](feature-presets.md) for a minimal configuration.
-2
View File
@@ -61,7 +61,6 @@
| ``power_temp`` | Temperature during load shedding | X | X | X | X | | ``power_temp`` | Temperature during load shedding | X | X | X | X |
| ``presence_sensor_entity_id`` | Presence sensor entity id (true if someone is present) | X | X | X | - | | ``presence_sensor_entity_id`` | Presence sensor entity id (true if someone is present) | X | X | X | - |
| ``minimal_activation_delay`` | Minimum activation delay | X | - | - | X | | ``minimal_activation_delay`` | Minimum activation delay | X | - | - | X |
| ``minimal_deactivation_delay`` | Minimum deactivation delay | X | - | - | X |
| ``safety_delay_min`` | Maximum delay between two temperature measurements | X | - | X | X | | ``safety_delay_min`` | Maximum delay between two temperature measurements | X | - | X | X |
| ``safety_min_on_percent`` | Minimum power percentage to enter security mode | X | - | X | X | | ``safety_min_on_percent`` | Minimum power percentage to enter security mode | X | - | X | X |
| ``auto_regulation_mode`` | Auto-regulation mode | - | X | - | - | | ``auto_regulation_mode`` | Auto-regulation mode | - | X | - | - |
@@ -260,7 +259,6 @@ The custom attributes are as follows:
| ``last_ext_temperature_datetime`` | The date and time in ISO8866 format of the last external temperature reception | | ``last_ext_temperature_datetime`` | The date and time in ISO8866 format of the last external temperature reception |
| ``security_state`` | The security state. True or false | | ``security_state`` | The security state. True or false |
| ``minimal_activation_delay_sec`` | The minimal activation delay in seconds | | ``minimal_activation_delay_sec`` | The minimal activation delay in seconds |
| ``minimal_deactivation_delay_sec``| The minimal deactivation delay in seconds |
| ``last_update_datetime`` | The date and time in ISO8866 format of this state | | ``last_update_datetime`` | The date and time in ISO8866 format of this state |
| ``friendly_name`` | The name of the thermostat | | ``friendly_name`` | The name of the thermostat |
| ``supported_features`` | A combination of all features supported by this thermostat. See the official climate integration documentation for more information | | ``supported_features`` | A combination of all features supported by this thermostat. See the official climate integration documentation for more information |
-14
View File
@@ -7,7 +7,6 @@ Cette page présente les étapes à suivre pour avoir un _VTherm_ basique mais o
- [Heatzy ou eCosy ou assimilé (entité `climate`)](#heatzy-ou-ecosy-ou-assimilé-entité-climate) - [Heatzy ou eCosy ou assimilé (entité `climate`)](#heatzy-ou-ecosy-ou-assimilé-entité-climate)
- [Simple switch comme Aqara T1, Nous B2Z, Sonoff ZBMini, Sonoff POW, ...](#simple-switch-comme-aqara-t1-nous-b2z-sonoff-zbmini-sonoff-pow-) - [Simple switch comme Aqara T1, Nous B2Z, Sonoff ZBMini, Sonoff POW, ...](#simple-switch-comme-aqara-t1-nous-b2z-sonoff-zbmini-sonoff-pow-)
- [Sonoff TRVZB ou assimilé (TRV avec contrôle de la vanne)](#sonoff-trvzb-ou-assimilé-trv-avec-contrôle-de-la-vanne) - [Sonoff TRVZB ou assimilé (TRV avec contrôle de la vanne)](#sonoff-trvzb-ou-assimilé-trv-avec-contrôle-de-la-vanne)
- [_PAC_ reversibles ou climatisation ou équipements commandables à travers une entité `climate`](#pac-reversibles-ou-climatisation-ou-équipements-commandables-à-travers-une-entité-climate)
- [La suite](#la-suite) - [La suite](#la-suite)
- [Appel à contribution](#appel-à-contribution) - [Appel à contribution](#appel-à-contribution)
@@ -72,19 +71,6 @@ Pour que cela fonctionne, il faut que le `closing degree` soit réglé au maximu
A l'issue de ces 5 étapes vous avez un _VTherm_ opérationnel ultra simple qui commande votre équipement Sonoff TRVZB ou assimilé. A l'issue de ces 5 étapes vous avez un _VTherm_ opérationnel ultra simple qui commande votre équipement Sonoff TRVZB ou assimilé.
## _PAC_ reversibles ou climatisation ou équipements commandables à travers une entité `climate`
Les _PAC_ ou assimilés sont visibles sous _HA_ sous la forme d'une entité `climate` qui permet de choisir le preset de chauffage à appliquer ou le mode (Chauffe / Froid / éteint).
_VTherm_ va réguler la température en commandant la consigne de l'équipement et son mode à l'aide de commandes envoyée à l'entité `climate` sous-jacente.
Pour l'intégrer dans _VTherm_ vous devez :
1. Créer un _VTherm_ de type `over_climate`. Cf. [création d'un _VTherm_](creation.md),
2. Lui donner des principaux attributs (nom, capteur de température de la pièce et capteur de température extérieure au minimium). Cf. [principaux attributs](base-attributes.md),
3. Lui donner un ou plusieurs équipements sous-jacents à contrôler. Le sous-jacent est ici l'entité `climate` qui contrôle la _PAC_ ou la clim... . Cf. [sous-jacent](over-climate.md),
A l'issue de ces 3 étapes vous avez un _VTherm_ opérationnel ultra simple qui commande votre _PAC_, climatisation ou assimilé. Pour aller plus loin, une auto-régulation peut êrte nécessaire en fonction du bon fonctionnement de votre équipement. L'auto-régulation consiste à envoyer des consignes légèrement modifiées par _VTherm_ pour forcer l'équipement à chauffer plus ou moins jusqu'à ce que la consigne soit atteinte. L'auto-régulation est détaillée ici : [auto-régulation](self-regulation.md).
# La suite # La suite
Uen fois créé, vous devez paramétrer les températures des presets. Cf. [presets](feature-presets.md) pour avoir une configuration minimale. Uen fois créé, vous devez paramétrer les températures des presets. Cf. [presets](feature-presets.md) pour avoir une configuration minimale.
-2
View File
@@ -181,7 +181,6 @@ FULL_CENTRAL_CONFIG = {
CONF_PRESENCE_SENSOR: "binary_sensor.mock_presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.mock_presence_sensor",
CONF_PRESET_POWER: 14, CONF_PRESET_POWER: 14,
CONF_MINIMAL_ACTIVATION_DELAY: 11, CONF_MINIMAL_ACTIVATION_DELAY: 11,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 61, CONF_SAFETY_DELAY_MIN: 61,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
@@ -223,7 +222,6 @@ FULL_CENTRAL_CONFIG_WITH_BOILER = {
CONF_MAX_POWER_SENSOR: "sensor.mock_max_power_sensor", CONF_MAX_POWER_SENSOR: "sensor.mock_max_power_sensor",
CONF_PRESET_POWER: 14, CONF_PRESET_POWER: 14,
CONF_MINIMAL_ACTIVATION_DELAY: 11, CONF_MINIMAL_ACTIVATION_DELAY: 11,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 61, CONF_SAFETY_DELAY_MIN: 61,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
-1
View File
@@ -185,7 +185,6 @@ MOCK_PRESENCE_AC_CONFIG = {
MOCK_ADVANCED_CONFIG = { MOCK_ADVANCED_CONFIG = {
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.4, CONF_SAFETY_MIN_ON_PERCENT: 0.4,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
-3
View File
@@ -53,7 +53,6 @@ async def test_over_climate_auto_fan_mode_turbo(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -120,7 +119,6 @@ async def test_over_climate_auto_fan_mode_not_turbo(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -191,7 +189,6 @@ async def test_over_climate_auto_fan_mode_turbo_activation(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
-8
View File
@@ -335,7 +335,6 @@ async def test_auto_start_stop_none_vtherm(
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -427,7 +426,6 @@ async def test_auto_start_stop_medium_heat_vtherm(
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -693,7 +691,6 @@ async def test_auto_start_stop_fast_ac_vtherm(
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_UNDERLYING_LIST: ["climate.mock_climate"], CONF_UNDERLYING_LIST: ["climate.mock_climate"],
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -935,7 +932,6 @@ async def test_auto_start_stop_medium_heat_vtherm_preset_change(
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -1149,7 +1145,6 @@ async def test_auto_start_stop_medium_heat_vtherm_preset_change_enable_false(
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -1289,7 +1284,6 @@ async def test_auto_start_stop_fast_heat_window(
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -1468,7 +1462,6 @@ async def test_auto_start_stop_fast_heat_window_mixed(
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -1651,7 +1644,6 @@ async def test_auto_start_stop_disable_vtherm_off(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
-7
View File
@@ -57,7 +57,6 @@ async def test_security_binary_sensors(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 30,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
}, },
@@ -139,7 +138,6 @@ async def test_overpowering_binary_sensors(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 100, CONF_DEVICE_POWER: 100,
@@ -242,7 +240,6 @@ async def test_window_binary_sensors(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor", CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
@@ -331,7 +328,6 @@ async def test_motion_binary_sensors(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor", CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
@@ -425,7 +421,6 @@ async def test_presence_binary_sensors(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_PRESENCE_SENSOR: "binary_sensor.mock_presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.mock_presence_sensor",
@@ -509,7 +504,6 @@ async def test_binary_sensors_over_climate_minimal(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
}, },
@@ -545,4 +539,3 @@ async def test_binary_sensors_over_climate_minimal(
hass, "binary_sensor.theoverclimatemockname_presence_state", "binary_sensor" hass, "binary_sensor.theoverclimatemockname_presence_state", "binary_sensor"
) )
assert presence_binary_sensor is None assert presence_binary_sensor is None
-4
View File
@@ -63,7 +63,6 @@ async def test_bug_63(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.0, # !! here CONF_SAFETY_MIN_ON_PERCENT: 0.0, # !! here
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.0, # !! here CONF_SAFETY_DEFAULT_ON_PERCENT: 0.0, # !! here
@@ -116,7 +115,6 @@ async def test_bug_64(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, # !! here CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, # !! here
@@ -306,7 +304,6 @@ async def test_bug_407(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 100, CONF_DEVICE_POWER: 100,
@@ -548,7 +545,6 @@ async def test_bug_465(hass: HomeAssistant, skip_hass_states_is_state):
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
-6
View File
@@ -111,7 +111,6 @@ async def test_update_central_boiler_state_simple(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -299,7 +298,6 @@ async def test_update_central_boiler_state_multiple(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -628,7 +626,6 @@ async def test_update_central_boiler_state_simple_valve(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -803,7 +800,6 @@ async def test_update_central_boiler_state_simple_climate(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_UNDERLYING_LIST: [climate1.entity_id], CONF_UNDERLYING_LIST: [climate1.entity_id],
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -994,7 +990,6 @@ async def test_update_central_boiler_state_simple_climate_valve_regulation(
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_HIGH, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_HIGH,
CONF_AUTO_REGULATION_USE_DEVICE_TEMP: False, CONF_AUTO_REGULATION_USE_DEVICE_TEMP: False,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -1260,7 +1255,6 @@ async def test_bug_339(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: climate1.entity_id, CONF_CLIMATE: climate1.entity_id,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
-5
View File
@@ -67,7 +67,6 @@ async def test_add_a_central_config(hass: HomeAssistant, skip_hass_states_is_sta
CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor", CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor",
CONF_PRESET_POWER: 14, CONF_PRESET_POWER: 14,
CONF_MINIMAL_ACTIVATION_DELAY: 11, CONF_MINIMAL_ACTIVATION_DELAY: 11,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 61, CONF_SAFETY_DELAY_MIN: 61,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
@@ -136,7 +135,6 @@ async def test_minimal_over_switch_wo_central_config(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -226,7 +224,6 @@ async def test_full_over_switch_wo_central_config(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -352,7 +349,6 @@ async def test_full_over_switch_with_central_config(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -515,7 +511,6 @@ async def test_migration_of_central_config(
CONF_TPI_COEF_INT: 0.5, CONF_TPI_COEF_INT: 0.5,
CONF_TPI_COEF_EXT: 0.02, CONF_TPI_COEF_EXT: 0.02,
CONF_MINIMAL_ACTIVATION_DELAY: 11, CONF_MINIMAL_ACTIVATION_DELAY: 11,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 61, CONF_SAFETY_DELAY_MIN: 61,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
-9
View File
@@ -56,7 +56,6 @@ async def test_config_with_central_mode_true(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -104,7 +103,6 @@ async def test_config_with_central_mode_false(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -155,7 +153,6 @@ async def test_config_with_central_mode_none(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -208,7 +205,6 @@ async def test_switch_change_central_mode_true(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -351,7 +347,6 @@ async def test_switch_ac_change_central_mode_true(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -487,7 +482,6 @@ async def test_climate_ac_change_central_mode_false(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -630,7 +624,6 @@ async def test_climate_ac_only_change_central_mode_true(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -785,7 +778,6 @@ async def test_switch_change_central_mode_true_with_window(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
@@ -943,7 +935,6 @@ async def test_switch_change_central_mode_true_with_cool_only_and_window(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
-2
View File
@@ -741,7 +741,6 @@ async def test_central_power_manager_start_vtherm_power(hass: HomeAssistant, ski
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 1000, CONF_DEVICE_POWER: 1000,
@@ -812,7 +811,6 @@ async def test_central_power_manager_start_vtherm_power(hass: HomeAssistant, ski
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_UNDERLYING_LIST: ["switch.mock_climate"], CONF_UNDERLYING_LIST: ["switch.mock_climate"],
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 150, CONF_DEVICE_POWER: 150,
-8
View File
@@ -471,7 +471,6 @@ async def test_user_config_flow_over_climate(
result["flow_id"], result["flow_id"],
user_input={ user_input={
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.4, CONF_SAFETY_MIN_ON_PERCENT: 0.4,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
@@ -496,7 +495,6 @@ async def test_user_config_flow_over_climate(
assert result.get("errors") is None assert result.get("errors") is None
assert result["data"] == MOCK_TH_OVER_CLIMATE_USER_CONFIG | MOCK_TH_OVER_CLIMATE_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_CENTRAL_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_TYPE_CONFIG | { assert result["data"] == MOCK_TH_OVER_CLIMATE_USER_CONFIG | MOCK_TH_OVER_CLIMATE_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_CENTRAL_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_TYPE_CONFIG | {
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.4, CONF_SAFETY_MIN_ON_PERCENT: 0.4,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
@@ -1079,7 +1077,6 @@ async def test_user_config_flow_over_climate_auto_start_stop(
result["flow_id"], result["flow_id"],
user_input={ user_input={
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.4, CONF_SAFETY_MIN_ON_PERCENT: 0.4,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
@@ -1107,7 +1104,6 @@ async def test_user_config_flow_over_climate_auto_start_stop(
"data" "data"
] == MOCK_TH_OVER_CLIMATE_USER_CONFIG | MOCK_TH_OVER_CLIMATE_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_CENTRAL_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_TYPE_CONFIG | { ] == MOCK_TH_OVER_CLIMATE_USER_CONFIG | MOCK_TH_OVER_CLIMATE_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_CENTRAL_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_TYPE_CONFIG | {
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.4, CONF_SAFETY_MIN_ON_PERCENT: 0.4,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
@@ -1278,7 +1274,6 @@ async def test_user_config_flow_over_switch_bug_552_tpi(
result["flow_id"], result["flow_id"],
user_input={ user_input={
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.4, CONF_SAFETY_MIN_ON_PERCENT: 0.4,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
@@ -1364,7 +1359,6 @@ async def test_user_config_flow_over_switch_bug_552_tpi(
CONF_TEMP_MAX: 30, CONF_TEMP_MAX: 30,
CONF_STEP_TEMPERATURE: 0.5, CONF_STEP_TEMPERATURE: 0.5,
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.4, CONF_SAFETY_MIN_ON_PERCENT: 0.4,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
@@ -1664,7 +1658,6 @@ async def test_user_config_flow_over_climate_valve(
result["flow_id"], result["flow_id"],
user_input={ user_input={
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.4, CONF_SAFETY_MIN_ON_PERCENT: 0.4,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
@@ -1691,7 +1684,6 @@ async def test_user_config_flow_over_climate_valve(
assert result.get("errors") is None assert result.get("errors") is None
assert result["data"] == MOCK_TH_OVER_CLIMATE_USER_CONFIG | MOCK_TH_OVER_CLIMATE_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_CENTRAL_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_TYPE_CONFIG | { assert result["data"] == MOCK_TH_OVER_CLIMATE_USER_CONFIG | MOCK_TH_OVER_CLIMATE_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_CENTRAL_MAIN_CONFIG | MOCK_TH_OVER_CLIMATE_TYPE_CONFIG | {
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.4, CONF_SAFETY_MIN_ON_PERCENT: 0.4,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
-1
View File
@@ -45,7 +45,6 @@ async def test_inverted_switch(hass: HomeAssistant, skip_hass_states_is_state):
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1, CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1,
-1
View File
@@ -54,7 +54,6 @@ async def test_last_seen_feature(hass: HomeAssistant, skip_hass_states_is_state)
"tpi_coef_int": 0.3, "tpi_coef_int": 0.3,
"tpi_coef_ext": 0.01, "tpi_coef_ext": 0.01,
"minimal_activation_delay": 30, "minimal_activation_delay": 30,
"minimal_deactivation_delay": 0,
CONF_SAFETY_DELAY_MIN: 5, # 5 minutes CONF_SAFETY_DELAY_MIN: 5, # 5 minutes
CONF_SAFETY_MIN_ON_PERCENT: 0.2, CONF_SAFETY_MIN_ON_PERCENT: 0.2,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
-5
View File
@@ -305,7 +305,6 @@ async def test_motion_management_time_not_enough(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 10, CONF_SAFETY_DELAY_MIN: 10,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor", CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
@@ -507,7 +506,6 @@ async def test_motion_management_time_enough_and_presence(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor", CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
@@ -633,7 +631,6 @@ async def test_motion_management_time_enough_and_not_presence(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor", CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
@@ -760,7 +757,6 @@ async def test_motion_management_with_stop_during_condition(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor", CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
@@ -894,7 +890,6 @@ async def test_motion_management_with_stop_during_condition_last_state_on(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor", CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
-6
View File
@@ -45,7 +45,6 @@ async def test_one_switch_cycle(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_HEATER: "switch.mock_switch1", CONF_HEATER: "switch.mock_switch1",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI, CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI,
@@ -249,7 +248,6 @@ async def test_multiple_switchs(
CONF_HEATER_4: "switch.mock_switch4", CONF_HEATER_4: "switch.mock_switch4",
CONF_HEATER_KEEP_ALIVE: 0, CONF_HEATER_KEEP_ALIVE: 0,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI, CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI,
@@ -385,7 +383,6 @@ async def test_multiple_climates(
CONF_CLIMATE_3: "switch.mock_climate3", CONF_CLIMATE_3: "switch.mock_climate3",
CONF_CLIMATE_4: "switch.mock_climate4", CONF_CLIMATE_4: "switch.mock_climate4",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
}, },
@@ -487,7 +484,6 @@ async def test_multiple_climates_underlying_changes(
CONF_CLIMATE_3: "switch.mock_climate3", CONF_CLIMATE_3: "switch.mock_climate3",
CONF_CLIMATE_4: "switch.mock_climate4", CONF_CLIMATE_4: "switch.mock_climate4",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
}, },
@@ -633,7 +629,6 @@ async def test_multiple_climates_underlying_changes_not_aligned(
CONF_CLIMATE_3: "switch.mock_climate3", CONF_CLIMATE_3: "switch.mock_climate3",
CONF_CLIMATE_4: "switch.mock_climate4", CONF_CLIMATE_4: "switch.mock_climate4",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
}, },
@@ -739,7 +734,6 @@ async def test_multiple_switch_power_management(
], ],
CONF_HEATER_KEEP_ALIVE: 0, CONF_HEATER_KEEP_ALIVE: 0,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI, CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI,
-5
View File
@@ -62,7 +62,6 @@ async def test_bug_56(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
}, },
@@ -654,7 +653,6 @@ async def test_bug_524(hass: HomeAssistant, skip_hass_states_is_state):
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -925,7 +923,6 @@ async def test_manual_hvac_off_should_take_the_lead_over_window(
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -1103,7 +1100,6 @@ async def test_manual_hvac_off_should_take_the_lead_over_auto_start_stop(
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor", CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
@@ -1271,7 +1267,6 @@ async def test_underlying_from_comes_back_to_life(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_UNDERLYING_LIST: ["climate.mock_climate"], CONF_UNDERLYING_LIST: ["climate.mock_climate"],
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_NONE, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_NONE,
+19 -31
View File
@@ -139,7 +139,7 @@ async def test_over_climate_valve_mono(hass: HomeAssistant, skip_hass_states_get
mock_service_call.assert_has_calls( mock_service_call.assert_has_calls(
[ [
call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree'}), call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree'}),
call(domain='number', service='set_value', service_data={'value': 100}, target={'entity_id': 'number.mock_closing_degree'}), call(domain='number', service='set_value', service_data={'value': 99}, target={'entity_id': 'number.mock_closing_degree'}),
call("climate","set_temperature",{ call("climate","set_temperature",{
"entity_id": "climate.mock_climate", "entity_id": "climate.mock_climate",
"temperature": 15, # temp-min "temperature": 15, # temp-min
@@ -187,7 +187,7 @@ async def test_over_climate_valve_mono(hass: HomeAssistant, skip_hass_states_get
mock_service_call.assert_has_calls( mock_service_call.assert_has_calls(
[ [
call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate', 'temperature': 19.0}), call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate', 'temperature': 19.0}),
call(domain='number', service='set_value', service_data={'value': 40}, target={'entity_id': 'number.mock_opening_degree'}), call(domain='number', service='set_value', service_data={'value': 39}, target={'entity_id': 'number.mock_opening_degree'}),
call(domain='number', service='set_value', service_data={'value': 60}, target={'entity_id': 'number.mock_closing_degree'}), call(domain='number', service='set_value', service_data={'value': 60}, target={'entity_id': 'number.mock_closing_degree'}),
# 3 = 18 (room) - 15 (current of underlying) + 0 (current offset) # 3 = 18 (room) - 15 (current of underlying) + 0 (current offset)
call(domain='number', service='set_value', service_data={'value': 3.0}, target={'entity_id': 'number.mock_offset_calibration'}) call(domain='number', service='set_value', service_data={'value': 3.0}, target={'entity_id': 'number.mock_offset_calibration'})
@@ -233,7 +233,7 @@ async def test_over_climate_valve_mono(hass: HomeAssistant, skip_hass_states_get
assert mock_service_call.call_count == 3 assert mock_service_call.call_count == 3
mock_service_call.assert_has_calls( mock_service_call.assert_has_calls(
[ [
call(domain='number', service='set_value', service_data={'value': 13}, target={'entity_id': 'number.mock_opening_degree'}), call(domain='number', service='set_value', service_data={'value': 12}, target={'entity_id': 'number.mock_opening_degree'}),
call(domain='number', service='set_value', service_data={'value': 87}, target={'entity_id': 'number.mock_closing_degree'}), call(domain='number', service='set_value', service_data={'value': 87}, target={'entity_id': 'number.mock_closing_degree'}),
# 6 = 18 (room) - 15 (current of underlying) + 3 (current offset) # 6 = 18 (room) - 15 (current of underlying) + 3 (current offset)
call(domain='number', service='set_value', service_data={'value': 6.899999999999999}, target={'entity_id': 'number.mock_offset_calibration'}) call(domain='number', service='set_value', service_data={'value': 6.899999999999999}, target={'entity_id': 'number.mock_offset_calibration'})
@@ -280,7 +280,7 @@ async def test_over_climate_valve_mono(hass: HomeAssistant, skip_hass_states_get
mock_service_call.assert_has_calls( mock_service_call.assert_has_calls(
[ [
call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree'}), call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree'}),
call(domain='number', service='set_value', service_data={'value': 100}, target={'entity_id': 'number.mock_closing_degree'}), call(domain='number', service='set_value', service_data={'value': 99}, target={'entity_id': 'number.mock_closing_degree'}),
# 6 = 18 (room) - 15 (current of underlying) + 3 (current offset) # 6 = 18 (room) - 15 (current of underlying) + 3 (current offset)
call(domain='number', service='set_value', service_data={'value': 9.0}, target={'entity_id': 'number.mock_offset_calibration'}) call(domain='number', service='set_value', service_data={'value': 9.0}, target={'entity_id': 'number.mock_offset_calibration'})
] ]
@@ -365,25 +365,13 @@ async def test_over_climate_valve_multi_presence(
mock_get_state_side_effect = SideEffects( mock_get_state_side_effect = SideEffects(
{ {
# Valve 1 is open # Valve 1 is open
"number.mock_opening_degree1": State( "number.mock_opening_degree1": State("number.mock_opening_degree1", "10", {"min": 0, "max": 100}),
"number.mock_opening_degree1", "10", {"min": 0, "max": 100} "number.mock_closing_degree1": State("number.mock_closing_degree1", "89", {"min": 0, "max": 100}),
), "number.mock_offset_calibration1": State("number.mock_offset_calibration1", "0", {"min": -12, "max": 12}),
"number.mock_closing_degree1": State(
"number.mock_closing_degree1", "90", {"min": 0, "max": 100}
),
"number.mock_offset_calibration1": State(
"number.mock_offset_calibration1", "0", {"min": -12, "max": 12}
),
# Valve 2 is closed # Valve 2 is closed
"number.mock_opening_degree2": State( "number.mock_opening_degree2": State("number.mock_opening_degree2", "0", {"min": 0, "max": 100}),
"number.mock_opening_degree2", "0", {"min": 0, "max": 100} "number.mock_closing_degree2": State("number.mock_closing_degree2", "99", {"min": 0, "max": 100}),
), "number.mock_offset_calibration2": State("number.mock_offset_calibration2", "10", {"min": -12, "max": 12}),
"number.mock_closing_degree2": State(
"number.mock_closing_degree2", "100", {"min": 0, "max": 100}
),
"number.mock_offset_calibration2": State(
"number.mock_offset_calibration2", "10", {"min": -12, "max": 12}
),
}, },
State("unknown.entity_id", "unknown"), State("unknown.entity_id", "unknown"),
) )
@@ -442,10 +430,10 @@ async def test_over_climate_valve_multi_presence(
mock_service_call.assert_has_calls([ mock_service_call.assert_has_calls([
call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate1', 'temperature': 19.0}), call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate1', 'temperature': 19.0}),
call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate2', 'temperature': 19.0}), call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate2', 'temperature': 19.0}),
call(domain='number', service='set_value', service_data={'value': 40}, target={'entity_id': 'number.mock_opening_degree1'}), call(domain='number', service='set_value', service_data={'value': 39}, target={'entity_id': 'number.mock_opening_degree1'}),
call(domain='number', service='set_value', service_data={'value': 60}, target={'entity_id': 'number.mock_closing_degree1'}), call(domain='number', service='set_value', service_data={'value': 60}, target={'entity_id': 'number.mock_closing_degree1'}),
call(domain='number', service='set_value', service_data={'value': 3.0}, target={'entity_id': 'number.mock_offset_calibration1'}), call(domain='number', service='set_value', service_data={'value': 3.0}, target={'entity_id': 'number.mock_offset_calibration1'}),
call(domain='number', service='set_value', service_data={'value': 40}, target={'entity_id': 'number.mock_opening_degree2'}), call(domain='number', service='set_value', service_data={'value': 39}, target={'entity_id': 'number.mock_opening_degree2'}),
call(domain='number', service='set_value', service_data={'value': 60}, target={'entity_id': 'number.mock_closing_degree2'}), call(domain='number', service='set_value', service_data={'value': 60}, target={'entity_id': 'number.mock_closing_degree2'}),
call(domain='number', service='set_value', service_data={'value': 12}, target={'entity_id': 'number.mock_offset_calibration2'}) call(domain='number', service='set_value', service_data={'value': 12}, target={'entity_id': 'number.mock_offset_calibration2'})
] ]
@@ -469,15 +457,15 @@ async def test_over_climate_valve_multi_presence(
assert vtherm.valve_open_percent == 0 assert vtherm.valve_open_percent == 0
# the underlying set temperature call and the call to the valve # the underlying set temperature call and the call to the valve
assert mock_service_call.call_count == 8 # assert mock_service_call.call_count == 8
mock_service_call.assert_has_calls([ mock_service_call.assert_has_calls([
call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate1', 'temperature': 17.2}), call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate1', 'temperature': 17.2}),
call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate2', 'temperature': 17.2}), call('climate', 'set_temperature', {'entity_id': 'climate.mock_climate2', 'temperature': 17.2}),
call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree1'}), call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree1'}),
call(domain='number', service='set_value', service_data={'value': 100}, target={'entity_id': 'number.mock_closing_degree1'}), call(domain='number', service='set_value', service_data={'value': 99}, target={'entity_id': 'number.mock_closing_degree1'}),
call(domain='number', service='set_value', service_data={'value': 3.0}, target={'entity_id': 'number.mock_offset_calibration1'}), call(domain='number', service='set_value', service_data={'value': 3.0}, target={'entity_id': 'number.mock_offset_calibration1'}),
call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree2'}), call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree2'}),
call(domain='number', service='set_value', service_data={'value': 100}, target={'entity_id': 'number.mock_closing_degree2'}), call(domain='number', service='set_value', service_data={'value': 99}, target={'entity_id': 'number.mock_closing_degree2'}),
call(domain='number', service='set_value', service_data={'value': 12}, target={'entity_id': 'number.mock_offset_calibration2'}) call(domain='number', service='set_value', service_data={'value': 12}, target={'entity_id': 'number.mock_offset_calibration2'})
] ]
) )
@@ -627,10 +615,10 @@ async def test_over_climate_valve_multi_min_opening_degrees(
assert mock_service_call.call_count == 6 assert mock_service_call.call_count == 6
mock_service_call.assert_has_calls([ mock_service_call.assert_has_calls([
# min is 60 # min is 60
call(domain='number', service='set_value', service_data={'value': 68}, target={'entity_id': 'number.mock_opening_degree1'}), call(domain='number', service='set_value', service_data={'value': 67}, target={'entity_id': 'number.mock_opening_degree1'}),
call(domain='number', service='set_value', service_data={'value': 32}, target={'entity_id': 'number.mock_closing_degree1'}), call(domain='number', service='set_value', service_data={'value': 32}, target={'entity_id': 'number.mock_closing_degree1'}),
call(domain='number', service='set_value', service_data={'value': 3.0}, target={'entity_id': 'number.mock_offset_calibration1'}), call(domain='number', service='set_value', service_data={'value': 3.0}, target={'entity_id': 'number.mock_offset_calibration1'}),
call(domain='number', service='set_value', service_data={'value': 76}, target={'entity_id': 'number.mock_opening_degree2'}), call(domain='number', service='set_value', service_data={'value': 75}, target={'entity_id': 'number.mock_opening_degree2'}),
call(domain='number', service='set_value', service_data={'value': 24}, target={'entity_id': 'number.mock_closing_degree2'}), call(domain='number', service='set_value', service_data={'value': 24}, target={'entity_id': 'number.mock_closing_degree2'}),
call(domain='number', service='set_value', service_data={'value': 12}, target={'entity_id': 'number.mock_offset_calibration2'}) call(domain='number', service='set_value', service_data={'value': 12}, target={'entity_id': 'number.mock_offset_calibration2'})
] ]
@@ -657,10 +645,10 @@ async def test_over_climate_valve_multi_min_opening_degrees(
assert mock_service_call.call_count == 6 assert mock_service_call.call_count == 6
mock_service_call.assert_has_calls([ mock_service_call.assert_has_calls([
call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree1'}), call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree1'}),
call(domain='number', service='set_value', service_data={'value': 100}, target={'entity_id': 'number.mock_closing_degree1'}), call(domain='number', service='set_value', service_data={'value': 99}, target={'entity_id': 'number.mock_closing_degree1'}),
call(domain='number', service='set_value', service_data={'value': 7.0}, target={'entity_id': 'number.mock_offset_calibration1'}), call(domain='number', service='set_value', service_data={'value': 7.0}, target={'entity_id': 'number.mock_offset_calibration1'}),
call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree2'}), call(domain='number', service='set_value', service_data={'value': 0}, target={'entity_id': 'number.mock_opening_degree2'}),
call(domain='number', service='set_value', service_data={'value': 100}, target={'entity_id': 'number.mock_closing_degree2'}), call(domain='number', service='set_value', service_data={'value': 99}, target={'entity_id': 'number.mock_closing_degree2'}),
call(domain='number', service='set_value', service_data={'value': 12}, target={'entity_id': 'number.mock_offset_calibration2'}) call(domain='number', service='set_value', service_data={'value': 12}, target={'entity_id': 'number.mock_offset_calibration2'})
] ]
) )
+1 -6
View File
@@ -130,7 +130,7 @@ async def test_power_feature_manager(
# fmt:on # fmt:on
# Finish the mock configuration # Finish the mock configuration
tpi_algo = PropAlgorithm(PROPORTIONAL_FUNCTION_TPI, 0.6, 0.01, 5, 0, 0, "climate.vtherm") tpi_algo = PropAlgorithm(PROPORTIONAL_FUNCTION_TPI, 0.6, 0.01, 5, 0, "climate.vtherm")
tpi_algo._on_percent = 1 # pylint: disable="protected-access" tpi_algo._on_percent = 1 # pylint: disable="protected-access"
type(fake_vtherm).hvac_mode = PropertyMock(return_value=HVACMode.HEAT) type(fake_vtherm).hvac_mode = PropertyMock(return_value=HVACMode.HEAT)
type(fake_vtherm).is_device_active = PropertyMock(return_value=is_device_active) type(fake_vtherm).is_device_active = PropertyMock(return_value=is_device_active)
@@ -354,7 +354,6 @@ async def test_power_management_hvac_off(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 100, CONF_DEVICE_POWER: 100,
@@ -463,7 +462,6 @@ async def test_power_management_hvac_on(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 100, CONF_DEVICE_POWER: 100,
@@ -631,7 +629,6 @@ async def test_power_management_energy_over_switch(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 100, CONF_DEVICE_POWER: 100,
@@ -764,7 +761,6 @@ async def test_power_management_energy_over_climate(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_UNDERLYING_LIST: ["climate.mock_climate"], CONF_UNDERLYING_LIST: ["climate.mock_climate"],
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 100, CONF_DEVICE_POWER: 100,
@@ -864,7 +860,6 @@ async def test_power_management_turn_off_while_shedding(hass: HomeAssistant, ski
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 100, CONF_DEVICE_POWER: 100,
-3
View File
@@ -152,7 +152,6 @@ async def test_security_feature(hass: HomeAssistant, skip_hass_states_is_state):
"tpi_coef_int": 0.3, "tpi_coef_int": 0.3,
"tpi_coef_ext": 0.01, "tpi_coef_ext": 0.01,
"minimal_activation_delay": 30, "minimal_activation_delay": 30,
"minimal_deactivation_delay": 0,
"security_delay_min": 5, # 5 minutes "security_delay_min": 5, # 5 minutes
"security_min_on_percent": 0.2, "security_min_on_percent": 0.2,
"security_default_on_percent": 0.1, "security_default_on_percent": 0.1,
@@ -347,7 +346,6 @@ async def test_security_feature_back_on_percent(
"tpi_coef_int": 0.3, "tpi_coef_int": 0.3,
"tpi_coef_ext": 0.01, "tpi_coef_ext": 0.01,
"minimal_activation_delay": 30, "minimal_activation_delay": 30,
"minimal_deactivation_delay": 0,
"safety_delay_min": 5, # 5 minutes "safety_delay_min": 5, # 5 minutes
"safety_min_on_percent": 0.2, "safety_min_on_percent": 0.2,
"safety_default_on_percent": 0.1, "safety_default_on_percent": 0.1,
@@ -659,7 +657,6 @@ async def test_migration_security_safety(
CONF_USE_POWER_FEATURE: False, CONF_USE_POWER_FEATURE: False,
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
}, },
) )
-3
View File
@@ -62,7 +62,6 @@ async def test_sensors_over_switch(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 200, CONF_DEVICE_POWER: 200,
@@ -223,7 +222,6 @@ async def test_sensors_over_climate(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 1.5, CONF_DEVICE_POWER: 1.5,
@@ -360,7 +358,6 @@ async def test_sensors_over_climate_minimal(
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "climate.mock_climate", CONF_CLIMATE: "climate.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
}, },
-1
View File
@@ -232,7 +232,6 @@ async def test_over_switch_deactivate_preset(
CONF_HEATER_KEEP_ALIVE: 0, CONF_HEATER_KEEP_ALIVE: 0,
CONF_SAFETY_DELAY_MIN: 10, CONF_SAFETY_DELAY_MIN: 10,
CONF_MINIMAL_ACTIVATION_DELAY: 10, CONF_MINIMAL_ACTIVATION_DELAY: 10,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI, CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI,
CONF_TPI_COEF_INT: 0.6, CONF_TPI_COEF_INT: 0.6,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
-1
View File
@@ -39,7 +39,6 @@ def config_entry() -> MockConfigEntry:
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.1, CONF_SAFETY_MIN_ON_PERCENT: 0.1,
}, },
-4
View File
@@ -75,7 +75,6 @@ async def test_add_number_for_central_config(
CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor", CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor",
CONF_PRESET_POWER: 14, CONF_PRESET_POWER: 14,
CONF_MINIMAL_ACTIVATION_DELAY: 11, CONF_MINIMAL_ACTIVATION_DELAY: 11,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 61, CONF_SAFETY_DELAY_MIN: 61,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
@@ -171,7 +170,6 @@ async def test_add_number_for_central_config_without_temp(
CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor", CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor",
CONF_PRESET_POWER: 14, CONF_PRESET_POWER: 14,
CONF_MINIMAL_ACTIVATION_DELAY: 11, CONF_MINIMAL_ACTIVATION_DELAY: 11,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 61, CONF_SAFETY_DELAY_MIN: 61,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
@@ -267,7 +265,6 @@ async def test_add_number_for_central_config_without_temp_ac_mode(
CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor", CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor",
CONF_PRESET_POWER: 14, CONF_PRESET_POWER: 14,
CONF_MINIMAL_ACTIVATION_DELAY: 11, CONF_MINIMAL_ACTIVATION_DELAY: 11,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 61, CONF_SAFETY_DELAY_MIN: 61,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
@@ -362,7 +359,6 @@ async def test_add_number_for_central_config_without_temp_restore(
CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor", CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor",
CONF_PRESET_POWER: 14, CONF_PRESET_POWER: 14,
CONF_MINIMAL_ACTIVATION_DELAY: 11, CONF_MINIMAL_ACTIVATION_DELAY: 11,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 61, CONF_SAFETY_DELAY_MIN: 61,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2, CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
-112
View File
@@ -38,7 +38,6 @@ async def test_tpi_calculation(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
# CONF_DEVICE_POWER: 100, # CONF_DEVICE_POWER: 100,
@@ -160,94 +159,6 @@ async def test_tpi_calculation(
assert tpi_algo.off_time_sec == 60 assert tpi_algo.off_time_sec == 60
@pytest.mark.parametrize("expected_lingering_tasks", [True])
@pytest.mark.parametrize("expected_lingering_timers", [True])
async def test_minimal_deactivation_delay(
hass: HomeAssistant, skip_hass_states_is_state: None
): # pylint: disable=unused-argument
"""Test the minimal deactivation delay"""
entry = MockConfigEntry(
domain=DOMAIN,
title="TheOverSwitchMockName",
unique_id="uniqueId",
data={
CONF_NAME: "TheOverSwitchMockName",
CONF_THERMOSTAT_TYPE: CONF_THERMOSTAT_SWITCH,
CONF_TEMP_SENSOR: "sensor.mock_temp_sensor",
CONF_EXTERNAL_TEMP_SENSOR: "sensor.mock_ext_temp_sensor",
CONF_CYCLE_MIN: 5,
CONF_TEMP_MIN: 15,
CONF_TEMP_MAX: 30,
CONF_USE_WINDOW_FEATURE: False,
CONF_USE_MOTION_FEATURE: False,
CONF_USE_POWER_FEATURE: False,
CONF_USE_PRESENCE_FEATURE: False,
CONF_HEATER: "switch.mock_switch",
CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI,
CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 60,
CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
},
)
entity: BaseThermostat = await create_thermostat(
hass, entry, "climate.theoverswitchmockname"
)
assert entity
assert entity._prop_algorithm # pylint: disable=protected-access
tpi_algo: PropAlgorithm = entity._prop_algorithm # pylint: disable=protected-access
assert tpi_algo
# off_time is less than minimal_deactivation_delay
tpi_algo.calculate(9, 6, 10, HVACMode.HEAT)
assert tpi_algo.on_percent == 0.89
assert tpi_algo.calculated_on_percent == 0.89
assert tpi_algo.on_time_sec == 300
assert tpi_algo.off_time_sec == 0
# off_time is less than minimal_deactivation_delay
tpi_algo.calculate(6, 0, 104, HVACMode.HEAT)
assert tpi_algo.on_percent == 0.82
assert tpi_algo.calculated_on_percent == 0.82
assert tpi_algo.on_time_sec == 300
assert tpi_algo.off_time_sec == 0
# off_time is exactly minimal_deactivation_delay
tpi_algo.calculate(10, 8, -10, HVACMode.HEAT)
assert tpi_algo.on_percent == 0.8
assert tpi_algo.calculated_on_percent == 0.8
assert tpi_algo.on_time_sec == 240
assert tpi_algo.off_time_sec == 60 # Equal to minimal_deactivation_delay
# off_time is greater than minimal_deactivation_delay
tpi_algo.calculate(10, 9, 0, HVACMode.HEAT)
assert tpi_algo.on_percent == 0.4
assert tpi_algo.calculated_on_percent == 0.4
assert tpi_algo.on_time_sec == 120
assert tpi_algo.off_time_sec == 180
# with safety mode
tpi_algo.set_safety(0.2)
tpi_algo.calculate(10, 8, -10, HVACMode.HEAT)
assert tpi_algo.on_percent == 0.2
assert tpi_algo.calculated_on_percent == 0.8
assert tpi_algo.on_time_sec == 60
assert tpi_algo.off_time_sec == 240
tpi_algo.unset_safety()
# with cooling mode
tpi_algo.calculate(10, 10, 90, HVACMode.COOL)
assert tpi_algo.on_percent == 0.8
assert tpi_algo.calculated_on_percent == 0.8
assert tpi_algo.on_time_sec == 240
assert tpi_algo.off_time_sec == 60
@pytest.mark.parametrize("expected_lingering_tasks", [True]) @pytest.mark.parametrize("expected_lingering_tasks", [True])
@pytest.mark.parametrize("expected_lingering_timers", [True]) @pytest.mark.parametrize("expected_lingering_timers", [True])
async def test_wrong_tpi_parameters( async def test_wrong_tpi_parameters(
@@ -263,7 +174,6 @@ async def test_wrong_tpi_parameters(
0.01, 0.01,
5, 5,
1, 1,
1,
"entity_id", "entity_id",
) )
# We should not be there # We should not be there
@@ -280,7 +190,6 @@ async def test_wrong_tpi_parameters(
0, 0,
2, 2,
3, 3,
3,
"entity_id", "entity_id",
) )
# We should not be there # We should not be there
@@ -297,7 +206,6 @@ async def test_wrong_tpi_parameters(
0, 0,
2, 2,
3, 3,
3,
"entity_id", "entity_id",
) )
# We should not be there # We should not be there
@@ -314,7 +222,6 @@ async def test_wrong_tpi_parameters(
None, None,
2, 2,
3, 3,
3,
"entity_id", "entity_id",
) )
# We should not be there # We should not be there
@@ -331,7 +238,6 @@ async def test_wrong_tpi_parameters(
0.00001, 0.00001,
None, None,
3, 3,
3,
"entity_id", "entity_id",
) )
# We should not be there # We should not be there
@@ -356,23 +262,6 @@ async def test_wrong_tpi_parameters(
# the normal case # the normal case
pass pass
# Test minimal_activation_delay
try:
algo = PropAlgorithm(
PROPORTIONAL_FUNCTION_TPI,
0.6,
0.00001,
0,
3,
None,
"entity_id",
)
# We should not be there
assert False
except TypeError as e:
# the normal case
pass
# Test vtherm_entity_id # Test vtherm_entity_id
try: try:
algo = PropAlgorithm( algo = PropAlgorithm(
@@ -381,7 +270,6 @@ async def test_wrong_tpi_parameters(
0.00001, 0.00001,
0, 0,
12, 12,
12,
None, None,
) )
# We should not be there # We should not be there
-3
View File
@@ -58,7 +58,6 @@ async def test_over_valve_full_start(
PRESET_BOOST + PRESET_AWAY_SUFFIX + PRESET_TEMP_SUFFIX: 17.3, PRESET_BOOST + PRESET_AWAY_SUFFIX + PRESET_TEMP_SUFFIX: 17.3,
CONF_PRESET_POWER: 10, CONF_PRESET_POWER: 10,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_DEVICE_POWER: 100, CONF_DEVICE_POWER: 100,
@@ -351,7 +350,6 @@ async def test_over_valve_regulation(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 60, CONF_SAFETY_DELAY_MIN: 60,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
# only send new valve open percent if dtemp is > 30% # only send new valve open percent if dtemp is > 30%
@@ -591,7 +589,6 @@ async def test_bug_533(
CONF_VALVE: "number.mock_valve", CONF_VALVE: "number.mock_valve",
CONF_AUTO_REGULATION_DTEMP: 10, # This parameter makes the bug CONF_AUTO_REGULATION_DTEMP: 10, # This parameter makes the bug
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 60, CONF_SAFETY_DELAY_MIN: 60,
}, },
# | temps, # | temps,
-14
View File
@@ -45,7 +45,6 @@ async def test_window_management_time_not_enough(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor", CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
@@ -135,7 +134,6 @@ async def test_window_management_time_enough(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor", CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
@@ -283,7 +281,6 @@ async def test_window_auto_fast(hass: HomeAssistant, skip_hass_states_is_state):
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1, CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1,
@@ -493,7 +490,6 @@ async def test_window_auto_fast_and_sensor(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_SENSOR: "binary_sensor.fake_window_sensor", CONF_WINDOW_SENSOR: "binary_sensor.fake_window_sensor",
@@ -619,7 +615,6 @@ async def test_window_auto_auto_stop(hass: HomeAssistant, skip_hass_states_is_st
CONF_USE_PRESENCE_FEATURE: False, CONF_USE_PRESENCE_FEATURE: False,
CONF_CLIMATE: "switch.mock_climate", CONF_CLIMATE: "switch.mock_climate",
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 6, CONF_WINDOW_AUTO_OPEN_THRESHOLD: 6,
@@ -788,7 +783,6 @@ async def test_window_auto_no_on_percent(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 6, CONF_WINDOW_AUTO_OPEN_THRESHOLD: 6,
@@ -916,7 +910,6 @@ async def test_window_bypass(hass: HomeAssistant, skip_hass_states_is_state):
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor", CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
@@ -1057,7 +1050,6 @@ async def test_window_auto_bypass(hass: HomeAssistant, skip_hass_states_is_state
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 6, CONF_WINDOW_AUTO_OPEN_THRESHOLD: 6,
@@ -1186,7 +1178,6 @@ async def test_window_bypass_reactivate(hass: HomeAssistant, skip_hass_states_is
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor", CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
@@ -1624,7 +1615,6 @@ async def test_window_action_eco_temp(hass: HomeAssistant, skip_hass_states_is_s
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1, CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1,
@@ -1822,7 +1812,6 @@ async def test_window_action_frost_temp(hass: HomeAssistant, skip_hass_states_is
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1, CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1,
@@ -2027,7 +2016,6 @@ async def test_bug_66(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.5, CONF_SAFETY_MIN_ON_PERCENT: 0.5,
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, # !! here CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, # !! here
@@ -2167,7 +2155,6 @@ async def test_window_action_frost_temp_preset_change(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_ACTION: CONF_WINDOW_FROST_TEMP, CONF_WINDOW_ACTION: CONF_WINDOW_FROST_TEMP,
@@ -2278,7 +2265,6 @@ async def test_window_action_frost_temp_temp_change(
CONF_TPI_COEF_INT: 0.3, CONF_TPI_COEF_INT: 0.3,
CONF_TPI_COEF_EXT: 0.01, CONF_TPI_COEF_EXT: 0.01,
CONF_MINIMAL_ACTIVATION_DELAY: 30, CONF_MINIMAL_ACTIVATION_DELAY: 30,
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
CONF_SAFETY_DELAY_MIN: 5, CONF_SAFETY_DELAY_MIN: 5,
CONF_SAFETY_MIN_ON_PERCENT: 0.3, CONF_SAFETY_MIN_ON_PERCENT: 0.3,
CONF_WINDOW_ACTION: CONF_WINDOW_FROST_TEMP, CONF_WINDOW_ACTION: CONF_WINDOW_FROST_TEMP,