Compare commits
24 Commits
7.1.6beta1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc7b7f43b9 | ||
|
|
2a125db73f | ||
|
|
bb4d3a59a9 | ||
|
|
15a48105b0 | ||
|
|
ea0d66f0c6 | ||
|
|
641801084d | ||
|
|
1576e9c189 | ||
|
|
313fa26160 | ||
|
|
832ea78a12 | ||
|
|
5f167af331 | ||
|
|
c20e641ac1 | ||
|
|
87064882a3 | ||
|
|
1c0a7cb4e8 | ||
|
|
b1f2fcd66d | ||
|
|
a0cdaa8a7f | ||
|
|
ebc2d8b6ac | ||
|
|
cf4cc32b13 | ||
|
|
2523fc74c2 | ||
|
|
87de91c2c5 | ||
|
|
a3b6f66f1b | ||
|
|
8cf09e5254 | ||
|
|
0b67226666 | ||
|
|
812bb19e10 | ||
|
|
be3012af71 |
@@ -8,12 +8,13 @@ recorder:
|
||||
domains:
|
||||
- input_boolean
|
||||
- input_number
|
||||
- input_select
|
||||
- switch
|
||||
- climate
|
||||
- sensor
|
||||
- binary_sensor
|
||||
- number
|
||||
- input_select
|
||||
- select
|
||||
- versatile_thermostat
|
||||
|
||||
logger:
|
||||
@@ -190,6 +191,9 @@ input_boolean:
|
||||
fake_valve_sonoff_trvzb2:
|
||||
name: Valve Sonoff TRVZB2
|
||||
icon: mdi:valve
|
||||
fake_inversed_heater:
|
||||
name: Inversed Heater
|
||||
icon: mdi:radiator-off
|
||||
|
||||
climate:
|
||||
- platform: generic_thermostat
|
||||
@@ -243,6 +247,11 @@ climate:
|
||||
heater: input_boolean.fake_valve_sonoff_trvzb2
|
||||
target_sensor: input_number.fake_temperature_sensor1
|
||||
ac_mode: false
|
||||
- platform: generic_thermostat
|
||||
name: Underlying switch climate
|
||||
heater: input_boolean.fake_heater_switch2
|
||||
target_sensor: input_number.fake_temperature_sensor1
|
||||
ac_mode: false
|
||||
|
||||
input_datetime:
|
||||
fake_last_seen:
|
||||
@@ -308,6 +317,21 @@ switch:
|
||||
option: comfort-2
|
||||
target:
|
||||
entity_id: select.seche_serviettes_sdb_rdc_cable_outlet_mode
|
||||
- platform: template
|
||||
switches:
|
||||
fake_inversed_switch:
|
||||
friendly_name: "A fake inversed switch"
|
||||
value_template: "{{ is_state('input_boolean.fake_inversed_heater', 'on') }}"
|
||||
turn_on:
|
||||
action: input_boolean.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.fake_inversed_heater
|
||||
turn_off:
|
||||
action: input_boolean.turn_off
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.fake_inversed_heater
|
||||
|
||||
frontend:
|
||||
extra_module_url:
|
||||
|
||||
@@ -37,7 +37,9 @@
|
||||
"yzhang.markdown-all-in-one",
|
||||
"github.vscode-github-actions",
|
||||
"azuretools.vscode-docker",
|
||||
"huizhou.githd"
|
||||
"huizhou.githd",
|
||||
"github.copilot",
|
||||
"github.copilot-chat"
|
||||
],
|
||||
"settings": {
|
||||
"files.eol": "\n",
|
||||
|
||||
58
README-fr.md
58
README-fr.md
@@ -13,15 +13,13 @@ Ce composant personnalisé pour Home Assistant est une mise à niveau et une ré
|
||||
|
||||
# Quoi de neuf ?
|
||||

|
||||
> * **Release 6.8**:
|
||||
> * **Release 7.2**:
|
||||
>
|
||||
> Ajout d'une nouvelle méthode de régulation pour les Versatile Thermostat de type `over_climate`. Cette méthode nommée 'Contrôle direct de la vanne' permet de contrôler directement la vanne d'un TRV et éventuellement un décalage pour calibrer le thermomètre interne de votre TRV. Cette nouvelle méthode a été testée avec des Sonoff TRVZB et généralisée pour d'autre type de TRV pour lesquels la vanne est directement commandable via des entités de type `number`.
|
||||
> - Prise en compte native des équipements pilotable via une entité de type `select` (ou `input_select`) ou `climate` pour des _VTherm_ de type `over_switch`. Cette évolution rend obsolète, la création de switch virtuels pour l'intégration des Nodon ou Heaty ou eCosy ... etc. Plus d'informations [ici](documentation/fr/over-switch.md#la-personnalisation-des-commandes).
|
||||
>
|
||||
> Plus d'informations [ici](documentation/fr/over-climate.md) et [ici](documentation/fr/self-regulation.md).
|
||||
> - Lien vers la documentation : cette version 7.2 expérimente des liens vers la documentation depuis les pages de configuration. Le lien est accessible via l'icone [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/over-switch.md#configuration). Elle est expérimentée sur certaines pages de la configuration.
|
||||
>
|
||||
> * **Refonte de la documentation**:
|
||||
>
|
||||
> Avec toutes les évolutions réalisées depuis le début de l'intégration, la documentation nécessitait une profonde re-organisation, c'est chose faite sur cette version. Tous vos retours sur cette nouvelle organisation seront les bienvenus.
|
||||
> - Ajout d'un chapitre dans la documentation nommé 'Démarrage rapide' permettant de mettre en oeuvre rapidement un _VTherm_ en fonction de votre équipement. La page est [ici](documentation/quick-start.md)
|
||||
|
||||
|
||||
# 🍻 Merci pour les bières [buymecoffee](https://www.buymeacoffee.com/jmcollin78) 🍻
|
||||
@@ -41,32 +39,38 @@ Un grand merci à tous mes fournisseurs de bières pour leurs dons et leurs enco
|
||||
|
||||
_PAC_ : Pompe à chaleur
|
||||
|
||||
_HA_ : Home Assistant
|
||||
|
||||
_sous-jacent_ : l'équipement controlé par _VTherm_
|
||||
|
||||
|
||||
# Documentation
|
||||
|
||||
La documentation est maintenant découpée en plusieurs pages pour faciliter la lecture et la recherche d'informations :
|
||||
1. [présentation](documentation/fr/presentation.md),
|
||||
2. [Installation](documentation/fr/installation.md),
|
||||
3. [choisir un type de VTherm](documentation/fr/creation.md),
|
||||
4. [les attributs de base](documentation/fr/base-attributes.md)
|
||||
5. [configurer un VTherm sur un `switch`](documentation/fr/over-switch.md)
|
||||
6. [configurer un VTherm sur un `climate`](documentation/fr/over-climate.md)
|
||||
7. [configurer un VTherm sur une vanne](documentation/fr/over-valve.md)
|
||||
8. [les pré-régages (preset)](documentation/fr/feature-presets.md)
|
||||
9. [la gestion des ouvertures](documentation/fr/feature-window.md)
|
||||
10. [la gestion de la présence](documentation/fr/feature-presence.md)
|
||||
11. [la gestion de mouvement](documentation/fr/feature-motion.md)
|
||||
12. [la gestion de la puissance](documentation/fr/feature-power.md)
|
||||
13. [l'auto start and stop](documentation/fr/feature-auto-start-stop.md)
|
||||
14. [la contrôle centralisé de tous vos VTherms](documentation/fr/feature-central-mode.md)
|
||||
15. [la commande du chauffage central](documentation/fr/feature-central-boiler.md)
|
||||
16. [aspects avancés, mode sécurité](documentation/fr/feature-advanced.md)
|
||||
17. [l'auto-régulation](documentation/fr/self-regulation.md)
|
||||
18. [exemples de réglages](documentation/fr/tuning-examples.md)
|
||||
19. [les différents algorithmes](documentation/fr/algorithms.md)
|
||||
20. [documentation de référence](documentation/fr/reference.md)
|
||||
21. [exemple de réglages](documentation/fr/tuning-examples.md)
|
||||
22. [dépannage](documentation/fr/troubleshooting.md)
|
||||
23. [notes de version](documentation/fr/releases.md)
|
||||
3. [Démarrage rapide](documentation/fr/quick-start.md)
|
||||
4. [choisir un type de VTherm](documentation/fr/creation.md),
|
||||
5. [les attributs de base](documentation/fr/base-attributes.md)
|
||||
6. [configurer un VTherm sur un `switch`](documentation/fr/over-switch.md)
|
||||
7. [configurer un VTherm sur un `climate`](documentation/fr/over-climate.md)
|
||||
8. [configurer un VTherm sur une vanne](documentation/fr/over-valve.md)
|
||||
9. [les pré-régages (preset)](documentation/fr/feature-presets.md)
|
||||
10. [la gestion des ouvertures](documentation/fr/feature-window.md)
|
||||
11. [la gestion de la présence](documentation/fr/feature-presence.md)
|
||||
12. [la gestion de mouvement](documentation/fr/feature-motion.md)
|
||||
13. [la gestion de la puissance](documentation/fr/feature-power.md)
|
||||
14. [l'auto start and stop](documentation/fr/feature-auto-start-stop.md)
|
||||
15. [la contrôle centralisé de tous vos VTherms](documentation/fr/feature-central-mode.md)
|
||||
16. [la commande du chauffage central](documentation/fr/feature-central-boiler.md)
|
||||
17. [aspects avancés, mode sécurité](documentation/fr/feature-advanced.md)
|
||||
18. [l'auto-régulation](documentation/fr/self-regulation.md)
|
||||
19. [exemples de réglages](documentation/fr/tuning-examples.md)
|
||||
20. [les différents algorithmes](documentation/fr/algorithms.md)
|
||||
21. [documentation de référence](documentation/fr/reference.md)
|
||||
22. [exemple de réglages](documentation/fr/tuning-examples.md)
|
||||
23. [dépannage](documentation/fr/troubleshooting.md)
|
||||
24. [notes de version](documentation/fr/releases.md)
|
||||
|
||||
|
||||
# Quelques résultats
|
||||
|
||||
61
README.md
61
README.md
@@ -13,15 +13,13 @@ This custom component for Home Assistant is an upgrade and a complete rewrite of
|
||||
|
||||
# What's new?
|
||||

|
||||
> * **Release 6.8**:
|
||||
# What's New?
|
||||

|
||||
> * **Release 7.2**:
|
||||
>
|
||||
> Added a new regulation method for `over_climate` type Versatile Thermostats. This method, called 'Direct control of valve', allows direct control of a TRV valve and optionally a calibration offset for the internal thermometer of your TRV. This new method has been tested with Sonoff TRVZB and generalized for other TRV types whose valves can be directly controlled via `number` entities.
|
||||
> - Native support for devices controlled via a `select` (or `input_select`) or `climate` entity for _VTherm_ of type `over_switch`. This update makes the creation of virtual switches obsolete for integrating Nodon, Heaty, eCosy, etc. More information [here](documentation/en/over-switch.md#command-customization).
|
||||
>
|
||||
> More information [here](documentation/en/over-climate.md) and [here](documentation/en/self-regulation.md).
|
||||
>
|
||||
> * **Documentation overhaul**:
|
||||
>
|
||||
> With all the developments since the start of the integration, the documentation needed a major reorganization, which has been completed in this version. All feedback on this new organization is welcome.
|
||||
> - Documentation links: Version 7.2 introduces experimental links to the documentation from the configuration pages. The link is accessible via the icon [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/over-switch.md#configuration). This feature is currently tested on some configuration pages.
|
||||
|
||||
# 🍻 Thanks for the beers [buymecoffee](https://www.buymeacoffee.com/jmcollin78) 🍻
|
||||
A big thank you to all my beer sponsors for their donations and encouragements. It means a lot to me and motivates me to keep going! If this integration has saved you money, buy me a beer in return; I would greatly appreciate it!
|
||||
@@ -38,34 +36,39 @@ A big thank you to all my beer sponsors for their donations and encouragements.
|
||||
|
||||
_slope_: The slope of the temperature curve, measured in ° (C or K)/h. It is positive when the temperature increases and negative when it decreases. This slope is calculated based on the _EMA_.
|
||||
|
||||
_PAC_ : Heat pump
|
||||
_PAC_: Heat pump
|
||||
|
||||
_HA_: Home Assistant
|
||||
|
||||
_underlying_: the device controlled by _VTherm_
|
||||
|
||||
# Documentation
|
||||
|
||||
The documentation is now divided into several pages for easier reading and searching:
|
||||
1. [Introduction](documentation/en/presentation.md),
|
||||
2. [Installation](documentation/en/installation.md),
|
||||
3. [Choosing a VTherm type](documentation/en/creation.md),
|
||||
4. [Basic attributes](documentation/en/base-attributes.md)
|
||||
3. [Configuring a VTherm on a `switch`](documentation/en/over-switch.md)
|
||||
3. [Configuring a VTherm on a `climate`](documentation/en/over-climate.md)
|
||||
3. [Configuring a VTherm on a valve](documentation/en/over-valve.md)
|
||||
4. [Presets](documentation/en/feature-presets.md)
|
||||
5. [Window management](documentation/en/feature-window.md)
|
||||
6. [Presence management](documentation/en/feature-presence.md)
|
||||
7. [Motion management](documentation/en/feature-motion.md)
|
||||
8. [Power management](documentation/en/feature-power.md)
|
||||
9. [Auto start and stop](documentation/en/feature-auto-start-stop.md)
|
||||
10. [Centralized control of all VTherms](documentation/en/feature-central-mode.md)
|
||||
11. [Central heating control](documentation/en/feature-central-boiler.md)
|
||||
12. [Advanced aspects, security mode](documentation/en/feature-advanced.md)
|
||||
12. [Self-regulation](documentation/en/self-regulation.md)
|
||||
13. [Tuning examples](documentation/en/tuning-examples.md)
|
||||
14. [Algorithms](documentation/en/algorithms.md)
|
||||
15. [Reference documentation](documentation/en/reference.md)
|
||||
16. [Tuning examples](documentation/en/tuning-examples.md)
|
||||
17. [Troubleshooting](documentation/en/troubleshooting.md)
|
||||
18. [Release notes](documentation/en/releases.md)
|
||||
3. [Démarrage rapide](documentation/en/quick-start.md)
|
||||
4. [Choosing a VTherm type](documentation/en/creation.md),
|
||||
5. [Basic attributes](documentation/en/base-attributes.md)
|
||||
6. [Configuring a VTherm on a `switch`](documentation/en/over-switch.md)
|
||||
7. [Configuring a VTherm on a `climate`](documentation/en/over-climate.md)
|
||||
8. [Configuring a VTherm on a valve](documentation/en/over-valve.md)
|
||||
9. [Presets](documentation/en/feature-presets.md)
|
||||
10. [Window management](documentation/en/feature-window.md)
|
||||
11. [Presence management](documentation/en/feature-presence.md)
|
||||
12. [Motion management](documentation/en/feature-motion.md)
|
||||
13. [Power management](documentation/en/feature-power.md)
|
||||
14. [Auto start and stop](documentation/en/feature-auto-start-stop.md)
|
||||
15. [Centralized control of all VTherms](documentation/en/feature-central-mode.md)
|
||||
16. [Central heating control](documentation/en/feature-central-boiler.md)
|
||||
17. [Advanced aspects, security mode](documentation/en/feature-advanced.md)
|
||||
18. [Self-regulation](documentation/en/self-regulation.md)
|
||||
19. [Tuning examples](documentation/en/tuning-examples.md)
|
||||
20. [Algorithms](documentation/en/algorithms.md)
|
||||
21. [Reference documentation](documentation/en/reference.md)
|
||||
22. [Tuning examples](documentation/en/tuning-examples.md)
|
||||
23. [Troubleshooting](documentation/en/troubleshooting.md)
|
||||
24. [Release notes](documentation/en/releases.md)
|
||||
|
||||
# Some results
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
|
||||
"last_temperature_datetime",
|
||||
"last_ext_temperature_datetime",
|
||||
"minimal_activation_delay_sec",
|
||||
"minimal_deactivation_delay_sec",
|
||||
"last_update_datetime",
|
||||
"timezone",
|
||||
"temperature_unit",
|
||||
@@ -370,6 +371,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
|
||||
self._tpi_coef_ext = 0
|
||||
|
||||
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_ext_temperature_measure = self.now
|
||||
|
||||
@@ -1050,7 +1052,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
|
||||
self._hvac_mode in [HVACMode.COOL, HVACMode.HEAT, HVACMode.HEAT_COOL]
|
||||
and self.preset_mode != PRESET_NONE
|
||||
):
|
||||
if self.preset_mode != PRESET_FROST_PROTECTION:
|
||||
if self.preset_mode != PRESET_FROST_PROTECTION or self._hvac_mode in [HVACMode.HEAT, HVACMode.HEAT_COOL]:
|
||||
await self.async_set_preset_mode_internal(self.preset_mode, True)
|
||||
else:
|
||||
await self.async_set_preset_mode_internal(PRESET_ECO, True, False)
|
||||
@@ -1244,12 +1246,12 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
|
||||
|
||||
async def async_set_humidity(self, humidity: int):
|
||||
"""Set new target humidity."""
|
||||
_LOGGER.info("%s - Set fan mode: %s", self, humidity)
|
||||
_LOGGER.info("%s - Set humidity: %s", self, humidity)
|
||||
return
|
||||
|
||||
async def async_set_swing_mode(self, swing_mode: str):
|
||||
"""Set new target swing operation."""
|
||||
_LOGGER.info("%s - Set fan mode: %s", self, swing_mode)
|
||||
_LOGGER.info("%s - Set swing mode: %s", self, swing_mode)
|
||||
return
|
||||
|
||||
async def async_set_temperature(self, **kwargs):
|
||||
@@ -1684,6 +1686,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity, Generic[T]):
|
||||
self._current_tz
|
||||
).isoformat(),
|
||||
"minimal_activation_delay_sec": self._minimal_activation_delay,
|
||||
"minimal_deactivation_delay_sec": self._minimal_deactivation_delay,
|
||||
ATTR_TOTAL_ENERGY: self.total_energy,
|
||||
"last_update_datetime": self.now.isoformat(),
|
||||
"timezone": str(self._current_tz),
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
import re
|
||||
import logging
|
||||
import copy
|
||||
from collections.abc import Mapping # pylint: disable=import-error
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.config_entries import (
|
||||
ConfigEntry,
|
||||
@@ -273,6 +272,34 @@ class VersatileThermostatBaseConfigFlow(FlowHandler):
|
||||
CONF_MIN_OPENING_DEGREES
|
||||
) from exc
|
||||
|
||||
# Check the VSWITCH configuration. There should be the same number of vswitch_on (resp. vswitch_off) than the number of underlying entity
|
||||
if self._infos.get(CONF_THERMOSTAT_TYPE) == CONF_THERMOSTAT_SWITCH and step_id == "type":
|
||||
if not self.check_vswitch_configuration(data):
|
||||
raise VirtualSwitchConfigurationIncorrect(CONF_VSWITCH_ON_CMD_LIST)
|
||||
|
||||
def check_vswitch_configuration(self, data) -> bool:
|
||||
"""Check the Virtual switch configuration and return True if the configuration is correct"""
|
||||
nb_under = len(data.get(CONF_UNDERLYING_LIST, []))
|
||||
|
||||
# check format of each command_on
|
||||
for command in data.get(CONF_VSWITCH_ON_CMD_LIST, []) + data.get(CONF_VSWITCH_OFF_CMD_LIST, []):
|
||||
pattern = r"^(?P<command>[a-zA-Z0-9_]+)(?:/(?P<argument>[a-zA-Z0-9_]+)(?::(?P<value>[a-zA-Z0-9_]+))?)?$"
|
||||
if not re.match(pattern, command):
|
||||
return False
|
||||
|
||||
nb_command_on = len(data.get(CONF_VSWITCH_ON_CMD_LIST, []))
|
||||
nb_command_off = len(data.get(CONF_VSWITCH_OFF_CMD_LIST, []))
|
||||
if (nb_command_on == nb_under or nb_command_on == 0) and (nb_command_off == nb_under or nb_command_off == 0):
|
||||
# There is enough command_on and off
|
||||
# Check if one under is not a switch (which have default command).
|
||||
if any(
|
||||
not thermostat_type.startswith(SWITCH_DOMAIN) and not thermostat_type.startswith(INPUT_BOOLEAN_DOMAIN) for thermostat_type in data.get(CONF_UNDERLYING_LIST, [])
|
||||
):
|
||||
if nb_command_on != nb_under or nb_command_off != nb_under:
|
||||
return False
|
||||
return True
|
||||
return False
|
||||
|
||||
def check_config_complete(self, infos) -> bool:
|
||||
"""True if the config is now complete (ie all mandatory attributes are set)"""
|
||||
is_central_config = (
|
||||
@@ -344,6 +371,12 @@ class VersatileThermostatBaseConfigFlow(FlowHandler):
|
||||
):
|
||||
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 (
|
||||
infos.get(CONF_PROP_FUNCTION, None) == PROPORTIONAL_FUNCTION_TPI
|
||||
and infos.get(CONF_USE_TPI_CENTRAL_CONFIG, False) is False
|
||||
@@ -407,6 +440,8 @@ class VersatileThermostatBaseConfigFlow(FlowHandler):
|
||||
errors["base"] = "valve_regulation_nb_entities_incorrect"
|
||||
except ValveRegulationMinOpeningDegreesIncorrect as err:
|
||||
errors[str(err)] = "min_opening_degrees_format"
|
||||
except VirtualSwitchConfigurationIncorrect as err:
|
||||
errors["base"] = "vswitch_configuration_incorrect"
|
||||
except Exception: # pylint: disable=broad-except
|
||||
_LOGGER.exception("Unexpected exception")
|
||||
errors["base"] = "unknown"
|
||||
|
||||
@@ -16,6 +16,14 @@ from homeassistant.components.input_number import (
|
||||
DOMAIN as INPUT_NUMBER_DOMAIN,
|
||||
)
|
||||
|
||||
from homeassistant.components.select import (
|
||||
DOMAIN as SELECT_DOMAIN,
|
||||
)
|
||||
|
||||
from homeassistant.components.input_select import (
|
||||
DOMAIN as INPUT_SELECT_DOMAIN,
|
||||
)
|
||||
|
||||
from homeassistant.components.input_datetime import (
|
||||
DOMAIN as INPUT_DATETIME_DOMAIN,
|
||||
)
|
||||
@@ -120,9 +128,7 @@ STEP_CENTRAL_BOILER_SCHEMA = vol.Schema(
|
||||
STEP_THERMOSTAT_SWITCH = vol.Schema( # pylint: disable=invalid-name
|
||||
{
|
||||
vol.Required(CONF_UNDERLYING_LIST): selector.EntitySelector(
|
||||
selector.EntitySelectorConfig(
|
||||
domain=[SWITCH_DOMAIN, INPUT_BOOLEAN_DOMAIN], multiple=True
|
||||
),
|
||||
selector.EntitySelectorConfig(domain=[SWITCH_DOMAIN, INPUT_BOOLEAN_DOMAIN, SELECT_DOMAIN, INPUT_SELECT_DOMAIN, CLIMATE_DOMAIN], multiple=True),
|
||||
),
|
||||
vol.Optional(CONF_HEATER_KEEP_ALIVE): cv.positive_int,
|
||||
vol.Required(CONF_PROP_FUNCTION, default=PROPORTIONAL_FUNCTION_TPI): vol.In(
|
||||
@@ -132,6 +138,10 @@ STEP_THERMOSTAT_SWITCH = vol.Schema( # pylint: disable=invalid-name
|
||||
),
|
||||
vol.Optional(CONF_AC_MODE, default=False): cv.boolean,
|
||||
vol.Optional(CONF_INVERSE_SWITCH, default=False): cv.boolean,
|
||||
vol.Optional("on_command_text"): vol.In([]),
|
||||
vol.Optional(CONF_VSWITCH_ON_CMD_LIST): selector.TextSelector(selector.TextSelectorConfig(type=selector.TextSelectorType.TEXT, multiple=True)),
|
||||
vol.Optional("off_command_text"): vol.In([]),
|
||||
vol.Optional(CONF_VSWITCH_OFF_CMD_LIST): selector.TextSelector(selector.TextSelectorConfig(type=selector.TextSelectorType.TEXT, multiple=True)),
|
||||
}
|
||||
)
|
||||
|
||||
@@ -364,6 +374,7 @@ STEP_PRESENCE_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_DEACTIVATION_DELAY, default=0): cv.positive_int,
|
||||
vol.Required(CONF_SAFETY_DELAY_MIN, default=60): cv.positive_int,
|
||||
vol.Required(
|
||||
CONF_SAFETY_MIN_ON_PERCENT,
|
||||
|
||||
@@ -83,6 +83,7 @@ CONF_TPI_COEF_EXT = "tpi_coef_ext"
|
||||
CONF_PRESENCE_SENSOR = "presence_sensor_entity_id"
|
||||
CONF_PRESET_POWER = "power_temp"
|
||||
CONF_MINIMAL_ACTIVATION_DELAY = "minimal_activation_delay"
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY = "minimal_deactivation_delay"
|
||||
CONF_TEMP_MIN = "temp_min"
|
||||
CONF_TEMP_MAX = "temp_max"
|
||||
CONF_SAFETY_DELAY_MIN = "safety_delay_min"
|
||||
@@ -127,6 +128,9 @@ CONF_OPENING_DEGREE_LIST = "opening_degree_entity_ids"
|
||||
CONF_CLOSING_DEGREE_LIST = "closing_degree_entity_ids"
|
||||
CONF_MIN_OPENING_DEGREES = "min_opening_degrees"
|
||||
|
||||
CONF_VSWITCH_ON_CMD_LIST = "vswitch_on_command"
|
||||
CONF_VSWITCH_OFF_CMD_LIST = "vswitch_off_command"
|
||||
|
||||
# Deprecated
|
||||
CONF_HEATER = "heater_entity_id"
|
||||
CONF_HEATER_2 = "heater_entity2_id"
|
||||
@@ -286,6 +290,7 @@ ALL_CONF = (
|
||||
CONF_TPI_COEF_EXT,
|
||||
CONF_PRESENCE_SENSOR,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY,
|
||||
CONF_TEMP_MIN,
|
||||
CONF_TEMP_MAX,
|
||||
CONF_SAFETY_DELAY_MIN,
|
||||
@@ -562,6 +567,10 @@ class ValveRegulationMinOpeningDegreesIncorrect(HomeAssistantError):
|
||||
"""Error to indicate that the minimal opening degrees is not a list of int separated by coma"""
|
||||
|
||||
|
||||
class VirtualSwitchConfigurationIncorrect(HomeAssistantError):
|
||||
"""Error when a virtual switch is not configured correctly"""
|
||||
|
||||
|
||||
class overrides: # pylint: disable=invalid-name
|
||||
"""An annotation to inform overrides"""
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ class FeatureWindowManager(BaseFeatureManager):
|
||||
{
|
||||
"window_sensor_entity_id",
|
||||
"is_window_configured",
|
||||
"is_window_bypass",
|
||||
"window_delay_sec",
|
||||
"window_off_delay_sec",
|
||||
"window_auto_configured",
|
||||
@@ -130,6 +129,11 @@ class FeatureWindowManager(BaseFeatureManager):
|
||||
@overrides
|
||||
async def start_listening(self):
|
||||
"""Start listening the underlying entity"""
|
||||
|
||||
#Try to get last window bypass state
|
||||
old_state = await self._vtherm.async_get_last_state()
|
||||
self._is_window_bypass = True if old_state and old_state.attributes and old_state.attributes.get("is_window_bypass") == True else False
|
||||
|
||||
if self._is_configured:
|
||||
self.stop_listening()
|
||||
if self._window_sensor_entity_id:
|
||||
@@ -449,22 +453,23 @@ class FeatureWindowManager(BaseFeatureManager):
|
||||
"""Set the window bypass flag
|
||||
Return True if state have been changed"""
|
||||
self._is_window_bypass = window_bypass
|
||||
if not self._is_window_bypass and self._window_state:
|
||||
_LOGGER.info(
|
||||
"%s - Last window state was open & ByPass is now off. Set hvac_mode to '%s'",
|
||||
self,
|
||||
HVACMode.OFF,
|
||||
)
|
||||
self._vtherm.save_hvac_mode()
|
||||
await self._vtherm.async_set_hvac_mode(HVACMode.OFF)
|
||||
return True
|
||||
|
||||
if self._window_state == STATE_ON:
|
||||
if not self._is_window_bypass:
|
||||
_LOGGER.info(
|
||||
"%s - Last window state was open & ByPass is now off. Set hvac_mode to '%s'",
|
||||
self,
|
||||
HVACMode.OFF,
|
||||
)
|
||||
self._vtherm.save_hvac_mode()
|
||||
await self._vtherm.async_set_hvac_mode(HVACMode.OFF)
|
||||
|
||||
if self._is_window_bypass and self._window_state:
|
||||
_LOGGER.info(
|
||||
"%s - Last window state was open & ByPass is now on. Set hvac_mode to last available mode",
|
||||
self,
|
||||
)
|
||||
await self._vtherm.restore_hvac_mode(True)
|
||||
if self._is_window_bypass:
|
||||
_LOGGER.info(
|
||||
"%s - Last window state was open & ByPass is now on. Set hvac_mode to last available mode",
|
||||
self,
|
||||
)
|
||||
await self._vtherm.restore_hvac_mode(True)
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -504,10 +509,10 @@ class FeatureWindowManager(BaseFeatureManager):
|
||||
|
||||
@property
|
||||
def is_window_detected(self) -> bool:
|
||||
"""Return true if the presence is configured and presence sensor is OFF"""
|
||||
"""Return true if the window is configured and open and bypass is not ON"""
|
||||
return self._is_configured and (
|
||||
self._window_state == STATE_ON or self._window_auto_state == STATE_ON
|
||||
)
|
||||
) and not self._is_window_bypass
|
||||
|
||||
@property
|
||||
def window_sensor_entity_id(self) -> bool:
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
"quality_scale": "silver",
|
||||
"requirements": [],
|
||||
"ssdp": [],
|
||||
"version": "7.1.4",
|
||||
"version": "7.2.1",
|
||||
"zeroconf": []
|
||||
}
|
||||
@@ -30,18 +30,20 @@ class PropAlgorithm:
|
||||
tpi_coef_ext,
|
||||
cycle_min: int,
|
||||
minimal_activation_delay: int,
|
||||
minimal_deactivation_delay: int,
|
||||
vtherm_entity_id: str = None,
|
||||
max_on_percent: float = None,
|
||||
) -> None:
|
||||
"""Initialisation of the Proportional Algorithm"""
|
||||
_LOGGER.debug(
|
||||
"%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
|
||||
"%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
|
||||
vtherm_entity_id,
|
||||
function_type,
|
||||
tpi_coef_int,
|
||||
tpi_coef_ext,
|
||||
cycle_min,
|
||||
minimal_activation_delay,
|
||||
minimal_deactivation_delay,
|
||||
)
|
||||
|
||||
# Issue 506 - check parameters
|
||||
@@ -51,10 +53,11 @@ class PropAlgorithm:
|
||||
or not is_number(tpi_coef_ext)
|
||||
or not is_number(cycle_min)
|
||||
or not is_number(minimal_activation_delay)
|
||||
or not is_number(minimal_deactivation_delay)
|
||||
or function_type != PROPORTIONAL_FUNCTION_TPI
|
||||
):
|
||||
_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",
|
||||
"%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",
|
||||
vtherm_entity_id,
|
||||
function_type,
|
||||
vtherm_entity_id,
|
||||
@@ -62,6 +65,7 @@ class PropAlgorithm:
|
||||
tpi_coef_ext,
|
||||
cycle_min,
|
||||
minimal_activation_delay,
|
||||
minimal_deactivation_delay,
|
||||
)
|
||||
raise TypeError(
|
||||
"TPI parameters are not set correctly. VTherm will not work as expected. Please reconfigure it correctly. See previous log for values"
|
||||
@@ -73,6 +77,7 @@ class PropAlgorithm:
|
||||
self._tpi_coef_ext = tpi_coef_ext
|
||||
self._cycle_min = cycle_min
|
||||
self._minimal_activation_delay = minimal_activation_delay
|
||||
self._minimal_deactivation_delay = minimal_deactivation_delay
|
||||
self._on_percent = 0
|
||||
self._calculated_on_percent = 0
|
||||
self._on_time_sec = 0
|
||||
@@ -187,6 +192,18 @@ class PropAlgorithm:
|
||||
|
||||
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):
|
||||
"""Set a default value for on_percent (used for safety mode)"""
|
||||
_LOGGER.info(
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"main": {
|
||||
"title": "Add new Versatile Thermostat",
|
||||
"description": "Main mandatory attributes",
|
||||
"description": "Main mandatory attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/base-attributes.md)",
|
||||
"data": {
|
||||
"name": "Name",
|
||||
"thermostat_type": "Thermostat type",
|
||||
@@ -71,7 +71,7 @@
|
||||
},
|
||||
"type": {
|
||||
"title": "Linked entities",
|
||||
"description": "Linked entities attributes",
|
||||
"description": "Linked entities attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/over-switch.md#configuration)",
|
||||
"data": {
|
||||
"underlying_entity_ids": "The device(s) to be controlled",
|
||||
"heater_keep_alive": "Switch keep-alive interval in seconds",
|
||||
@@ -82,7 +82,11 @@
|
||||
"auto_regulation_periode_min": "Regulation minimum period",
|
||||
"auto_regulation_use_device_temp": "Use internal temperature of the underlying",
|
||||
"inverse_switch_command": "Inverse switch command",
|
||||
"auto_fan_mode": "Auto fan mode"
|
||||
"auto_fan_mode": "Auto fan mode",
|
||||
"on_command_text": "Turn on command customization",
|
||||
"vswitch_on_command": "Optional turn on commands",
|
||||
"off_command_text": "Turn off command customization",
|
||||
"vswitch_off_command": "Optional turn off commands"
|
||||
},
|
||||
"data_description": {
|
||||
"underlying_entity_ids": "The device(s) to be controlled - 1 is required",
|
||||
@@ -94,12 +98,13 @@
|
||||
"auto_regulation_periode_min": "Duration in minutes between two regulation update",
|
||||
"auto_regulation_use_device_temp": "Use the eventual internal temperature sensor of the underlying to speedup the self-regulation",
|
||||
"inverse_switch_command": "For switch with pilot wire and diode you may need to inverse the command",
|
||||
"auto_fan_mode": "Automatically activate fan when huge heating/cooling is necessary"
|
||||
"auto_fan_mode": "Automatically activate fan when huge heating/cooling is necessary",
|
||||
"on_command_text": "For underlying of type `select` or `climate` you have to customize the commands."
|
||||
}
|
||||
},
|
||||
"tpi": {
|
||||
"title": "TPI",
|
||||
"description": "Time Proportional Integral attributes",
|
||||
"description": "Time Proportional Integral attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/algorithms.md#lalgorithme-tpi)",
|
||||
"data": {
|
||||
"tpi_coef_int": "coef_int",
|
||||
"tpi_coef_ext": "coef_ext",
|
||||
@@ -113,14 +118,14 @@
|
||||
},
|
||||
"presets": {
|
||||
"title": "Presets",
|
||||
"description": "Select if the thermostat will use central preset - deselect for the thermostat to have its own presets",
|
||||
"description": "Select if the thermostat will use central preset - deselect for the thermostat to have its own presets [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-presets.md)",
|
||||
"data": {
|
||||
"use_presets_central_config": "Use central presets configuration"
|
||||
}
|
||||
},
|
||||
"window": {
|
||||
"title": "Window management",
|
||||
"description": "Open window management.\nYou can also configure automatic window open detection based on temperature decrease",
|
||||
"description": "Open window management.\nYou can also configure automatic window open detection based on temperature decrease [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-window.md)",
|
||||
"data": {
|
||||
"window_sensor_entity_id": "Window sensor entity id",
|
||||
"window_delay": "Window sensor 'on' delay (seconds)",
|
||||
@@ -144,7 +149,7 @@
|
||||
},
|
||||
"motion": {
|
||||
"title": "Motion management",
|
||||
"description": "Motion sensor management. Preset can switch automatically depending on motion detection\nmotion_preset and no_motion_preset should be set to the corresponding preset name",
|
||||
"description": "Motion sensor management. Preset can switch automatically depending on motion detection\nmotion_preset and no_motion_preset should be set to the corresponding preset name [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-motion.md)",
|
||||
"data": {
|
||||
"motion_sensor_entity_id": "Motion sensor entity id",
|
||||
"motion_delay": "Activation delay",
|
||||
@@ -164,7 +169,7 @@
|
||||
},
|
||||
"power": {
|
||||
"title": "Power management",
|
||||
"description": "Power management attributes.\nGives the power and max power sensor of your home.\nSpecify the power consumption of the heater when on.\nAll sensors and device power should use the same unit (kW or W).",
|
||||
"description": "Power management attributes.\nGives the power and max power sensor of your home.\nSpecify the power consumption of the heater when on.\nAll sensors and device power should use the same unit (kW or W) [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-power.md)",
|
||||
"data": {
|
||||
"power_sensor_entity_id": "Power",
|
||||
"max_power_sensor_entity_id": "Max power",
|
||||
@@ -180,7 +185,7 @@
|
||||
},
|
||||
"presence": {
|
||||
"title": "Presence management",
|
||||
"description": "Presence management attributes.\nGives the a presence sensor of your home (true is someone is present) and give the corresponding temperature preset setting.",
|
||||
"description": "Presence management attributes.\nGives the a presence sensor of your home (true is someone is present) and give the corresponding temperature preset setting [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-presence.md)",
|
||||
"data": {
|
||||
"presence_sensor_entity_id": "Presence sensor",
|
||||
"use_presence_central_config": "Use central presence temperature configuration. Deselect to use specific temperature entities"
|
||||
@@ -191,9 +196,10 @@
|
||||
},
|
||||
"advanced": {
|
||||
"title": "Advanced parameters",
|
||||
"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.",
|
||||
"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 [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)",
|
||||
"data": {
|
||||
"minimal_activation_delay": "Minimum activation delay",
|
||||
"minimal_deactivation_delay": "Minimum deactivation delay",
|
||||
"safety_delay_min": "Safety delay (in minutes)",
|
||||
"safety_min_on_percent": "Minimum power percent to enable safety mode",
|
||||
"safety_default_on_percent": "Power percent to use in safety mode",
|
||||
@@ -201,6 +207,7 @@
|
||||
},
|
||||
"data_description": {
|
||||
"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_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",
|
||||
@@ -209,7 +216,7 @@
|
||||
},
|
||||
"central_boiler": {
|
||||
"title": "Control of the central boiler",
|
||||
"description": "Enter the services to call to turn on/off the central boiler. Leave blank if no service call is to be made (in this case, you will have to manage the turning on/off of your central boiler yourself). The service called must be formatted as follows: `entity_id/service_name[/attribute:value]` (/attribute:value is optional)\nFor example:\n- to turn on a switch: `switch.controle_chaudiere/switch.turn_on`\n- to turn off a switch: `switch.controle_chaudiere/switch.turn_off`\n- to program the boiler to 25° and thus force its ignition: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- to send 10° to the boiler and thus force its extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10`",
|
||||
"description": "Enter the services to call to turn on/off the central boiler. Leave blank if no service call is to be made (in this case, you will have to manage the turning on/off of your central boiler yourself). The service called must be formatted as follows: `entity_id/service_name[/attribute:value]` (/attribute:value is optional)\nFor example:\n- to turn on a switch: `switch.controle_chaudiere/switch.turn_on`\n- to turn off a switch: `switch.controle_chaudiere/switch.turn_off`\n- to program the boiler to 25° and thus force its ignition: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- to send 10° to the boiler and thus force its extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10` [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-central-boiler.md)",
|
||||
"data": {
|
||||
"central_boiler_activation_service": "Command to turn-on",
|
||||
"central_boiler_deactivation_service": "Command to turn-off"
|
||||
@@ -221,7 +228,7 @@
|
||||
},
|
||||
"valve_regulation": {
|
||||
"title": "Self-regulation with valve",
|
||||
"description": "Configuration for self-regulation with direct control of the valve",
|
||||
"description": "Configuration for self-regulation with direct control of the valve [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/self-regulation.md#auto-régulation-par-contrôle-direct-de-la-vanne)",
|
||||
"data": {
|
||||
"offset_calibration_entity_ids": "Offset calibration entities",
|
||||
"opening_degree_entity_ids": "Opening degree entities",
|
||||
@@ -283,7 +290,7 @@
|
||||
},
|
||||
"main": {
|
||||
"title": "Main - {name}",
|
||||
"description": "Main mandatory attributes",
|
||||
"description": "Main mandatory attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/base-attributes.md)",
|
||||
"data": {
|
||||
"name": "Name",
|
||||
"thermostat_type": "Thermostat type",
|
||||
@@ -319,7 +326,7 @@
|
||||
},
|
||||
"type": {
|
||||
"title": "Entities - {name}",
|
||||
"description": "Linked entities attributes",
|
||||
"description": "Linked entities attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/over-switch.md#configuration)",
|
||||
"data": {
|
||||
"underlying_entity_ids": "The device(s) to be controlled",
|
||||
"heater_keep_alive": "Switch keep-alive interval in seconds",
|
||||
@@ -330,7 +337,11 @@
|
||||
"auto_regulation_periode_min": "Regulation minimum period",
|
||||
"auto_regulation_use_device_temp": "Use internal temperature of the underlying",
|
||||
"inverse_switch_command": "Inverse switch command",
|
||||
"auto_fan_mode": "Auto fan mode"
|
||||
"auto_fan_mode": "Auto fan mode",
|
||||
"on_command_text": "Turn on command customization",
|
||||
"vswitch_on_command": "Optional turn on commands",
|
||||
"off_command_text": "Turn off command customization",
|
||||
"vswitch_off_command": "Optional turn off commands"
|
||||
},
|
||||
"data_description": {
|
||||
"underlying_entity_ids": "The device(s) to be controlled - 1 is required",
|
||||
@@ -341,13 +352,14 @@
|
||||
"auto_regulation_dtemp": "The threshold in ° (or % for valve) under which the temperature change will not be sent",
|
||||
"auto_regulation_periode_min": "Duration in minutes between two regulation update",
|
||||
"auto_regulation_use_device_temp": "Use the eventual internal temperature sensor of the underlying to speedup the self-regulation",
|
||||
"inverse_switch_command": "For switch with pilot wire and diode you may need to invert the command",
|
||||
"auto_fan_mode": "Automatically activate fan when huge heating/cooling is necessary"
|
||||
"inverse_switch_command": "For switch with pilot wire and diode you may need to inverse the command",
|
||||
"auto_fan_mode": "Automatically activate fan when huge heating/cooling is necessary",
|
||||
"on_command_text": "For underlying of type `select` or `climate` you have to customize the commands."
|
||||
}
|
||||
},
|
||||
"tpi": {
|
||||
"title": "TPI - {name}",
|
||||
"description": "Time Proportional Integral attributes",
|
||||
"description": "Time Proportional Integral attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/algorithms.md#lalgorithme-tpi)",
|
||||
"data": {
|
||||
"tpi_coef_int": "coef_int",
|
||||
"tpi_coef_ext": "coef_ext",
|
||||
@@ -361,14 +373,14 @@
|
||||
},
|
||||
"presets": {
|
||||
"title": "Presets - {name}",
|
||||
"description": "Check if the thermostat will use central presets. Uncheck and the thermostat will have its own preset entities",
|
||||
"description": "Check if the thermostat will use central presets. Uncheck and the thermostat will have its own preset entities [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-presets.md)",
|
||||
"data": {
|
||||
"use_presets_central_config": "Use central presets configuration"
|
||||
}
|
||||
},
|
||||
"window": {
|
||||
"title": "Window - {name}",
|
||||
"description": "Open window management.\nYou can also configure automatic window open detection based on temperature decrease",
|
||||
"description": "Open window management.\nYou can also configure automatic window open detection based on temperature decrease [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-window.md)",
|
||||
"data": {
|
||||
"window_sensor_entity_id": "Window sensor entity id",
|
||||
"window_delay": "Window sensor 'on' delay (seconds)",
|
||||
@@ -391,7 +403,7 @@
|
||||
},
|
||||
"motion": {
|
||||
"title": "Motion - {name}",
|
||||
"description": "Motion management. Preset can switch automatically depending of a motion detection\nmotion_preset and no_motion_preset should be set to the corresponding preset name",
|
||||
"description": "Motion management. Preset can switch automatically depending of a motion detection\nmotion_preset and no_motion_preset should be set to the corresponding preset name [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-motion.md)",
|
||||
"data": {
|
||||
"motion_sensor_entity_id": "Motion sensor entity id",
|
||||
"motion_delay": "Activation delay",
|
||||
@@ -411,7 +423,7 @@
|
||||
},
|
||||
"power": {
|
||||
"title": "Power - {name}",
|
||||
"description": "Power management attributes.\nGives the power and max power sensor of your home.\nThen specify the power consumption of the heater when on.\nAll sensors and device power should have the same unit (kW or W).",
|
||||
"description": "Power management attributes.\nGives the power and max power sensor of your home.\nSpecify the power consumption of the heater when on.\nAll sensors and device power should use the same unit (kW or W) [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-power.md)",
|
||||
"data": {
|
||||
"power_sensor_entity_id": "Power",
|
||||
"max_power_sensor_entity_id": "Max power",
|
||||
@@ -427,7 +439,7 @@
|
||||
},
|
||||
"presence": {
|
||||
"title": "Presence - {name}",
|
||||
"description": "Presence management attributes.\nGives the a presence sensor of your home (true is someone is present) and give the corresponding temperature preset setting.",
|
||||
"description": "Presence management attributes.\nGives the a presence sensor of your home (true is someone is present) and give the corresponding temperature preset setting [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-presence.md)",
|
||||
"data": {
|
||||
"presence_sensor_entity_id": "Presence sensor",
|
||||
"use_presence_central_config": "Use central presence temperature configuration. Uncheck to use specific temperature entities"
|
||||
@@ -438,9 +450,10 @@
|
||||
},
|
||||
"advanced": {
|
||||
"title": "Advanced - {name}",
|
||||
"description": "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.",
|
||||
"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 [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)",
|
||||
"data": {
|
||||
"minimal_activation_delay": "Minimum activation delay",
|
||||
"minimal_deactivation_delay": "Minimum deactivation delay",
|
||||
"safety_delay_min": "Safety delay (in minutes)",
|
||||
"safety_min_on_percent": "Minimum power percent to enable safety mode",
|
||||
"safety_default_on_percent": "Power percent to use in safety mode",
|
||||
@@ -448,6 +461,7 @@
|
||||
},
|
||||
"data_description": {
|
||||
"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_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",
|
||||
@@ -456,7 +470,7 @@
|
||||
},
|
||||
"central_boiler": {
|
||||
"title": "Control of the central boiler - {name}",
|
||||
"description": "Enter the services to call to turn on/off the central boiler. Leave blank if no service call is to be made (in this case, you will have to manage the turning on/off of your central boiler yourself). The service called must be formatted as follows: `entity_id/service_name[/attribute:value]` (/attribute:value is optional)\nFor example:\n- to turn on a switch: `switch.controle_chaudiere/switch.turn_on`\n- to turn off a switch: `switch.controle_chaudiere/switch.turn_off`\n- to program the boiler to 25° and thus force its ignition: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- to send 10° to the boiler and thus force its extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10`",
|
||||
"description": "Enter the services to call to turn on/off the central boiler. Leave blank if no service call is to be made (in this case, you will have to manage the turning on/off of your central boiler yourself). The service called must be formatted as follows: `entity_id/service_name[/attribute:value]` (/attribute:value is optional)\nFor example:\n- to turn on a switch: `switch.controle_chaudiere/switch.turn_on`\n- to turn off a switch: `switch.controle_chaudiere/switch.turn_off`\n- to program the boiler to 25° and thus force its ignition: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- to send 10° to the boiler and thus force its extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10` [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-central-boiler.md)",
|
||||
"data": {
|
||||
"central_boiler_activation_service": "Command to turn-on",
|
||||
"central_boiler_deactivation_service": "Command to turn-off"
|
||||
@@ -468,7 +482,7 @@
|
||||
},
|
||||
"valve_regulation": {
|
||||
"title": "Self-regulation with valve - {name}",
|
||||
"description": "Configuration for self-regulation with direct control of the valve",
|
||||
"description": "Configuration for self-regulation with direct control of the valve [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/self-regulation.md#auto-régulation-par-contrôle-direct-de-la-vanne)",
|
||||
"data": {
|
||||
"offset_calibration_entity_ids": "Offset calibration entities",
|
||||
"opening_degree_entity_ids": "Opening degree entities",
|
||||
@@ -559,7 +573,7 @@
|
||||
"preset_mode": {
|
||||
"state": {
|
||||
"power": "Shedding",
|
||||
"security": "Safety",
|
||||
"safety": "Safety",
|
||||
"none": "Manual",
|
||||
"frost": "Frost"
|
||||
}
|
||||
|
||||
@@ -1104,7 +1104,7 @@ class ThermostatOverClimate(BaseThermostat[UnderlyingClimate]):
|
||||
@overrides
|
||||
async def async_set_humidity(self, humidity: int):
|
||||
"""Set new target humidity."""
|
||||
_LOGGER.info("%s - Set fan mode: %s", self, humidity)
|
||||
_LOGGER.info("%s - Set humidity: %s", self, humidity)
|
||||
if humidity is None:
|
||||
return
|
||||
for under in self._underlyings:
|
||||
@@ -1115,7 +1115,7 @@ class ThermostatOverClimate(BaseThermostat[UnderlyingClimate]):
|
||||
@overrides
|
||||
async def async_set_swing_mode(self, swing_mode):
|
||||
"""Set new target swing operation."""
|
||||
_LOGGER.info("%s - Set fan mode: %s", self, swing_mode)
|
||||
_LOGGER.info("%s - Set swing mode: %s", self, swing_mode)
|
||||
if swing_mode is None:
|
||||
return
|
||||
for under in self._underlyings:
|
||||
|
||||
@@ -82,6 +82,7 @@ class ThermostatOverClimateValve(ThermostatOverClimate):
|
||||
self._tpi_coef_ext,
|
||||
self._cycle_min,
|
||||
self._minimal_activation_delay,
|
||||
self._minimal_deactivation_delay,
|
||||
self.name,
|
||||
)
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ from .const import (
|
||||
CONF_UNDERLYING_LIST,
|
||||
CONF_HEATER_KEEP_ALIVE,
|
||||
CONF_INVERSE_SWITCH,
|
||||
CONF_VSWITCH_ON_CMD_LIST,
|
||||
CONF_VSWITCH_OFF_CMD_LIST,
|
||||
overrides,
|
||||
)
|
||||
|
||||
@@ -40,6 +42,8 @@ class ThermostatOverSwitch(BaseThermostat[UnderlyingSwitch]):
|
||||
"tpi_coef_ext",
|
||||
"power_percent",
|
||||
"calculated_on_percent",
|
||||
"vswitch_on_commands",
|
||||
"vswitch_off_commands",
|
||||
}
|
||||
)
|
||||
)
|
||||
@@ -47,6 +51,8 @@ class ThermostatOverSwitch(BaseThermostat[UnderlyingSwitch]):
|
||||
def __init__(self, hass: HomeAssistant, unique_id, name, config_entry) -> None:
|
||||
"""Initialize the thermostat over switch."""
|
||||
self._is_inversed: bool | None = None
|
||||
self._lst_vswitch_on: list[str] = []
|
||||
self._lst_vswitch_off: list[str] = []
|
||||
super().__init__(hass, unique_id, name, config_entry)
|
||||
|
||||
@property
|
||||
@@ -71,14 +77,21 @@ class ThermostatOverSwitch(BaseThermostat[UnderlyingSwitch]):
|
||||
self._tpi_coef_ext,
|
||||
self._cycle_min,
|
||||
self._minimal_activation_delay,
|
||||
self._minimal_deactivation_delay,
|
||||
self.name,
|
||||
max_on_percent=self._max_on_percent,
|
||||
)
|
||||
|
||||
self._is_inversed = config_entry.get(CONF_INVERSE_SWITCH) is True
|
||||
|
||||
lst_switches = config_entry.get(CONF_UNDERLYING_LIST)
|
||||
self._lst_vswitch_on = config_entry.get(CONF_VSWITCH_ON_CMD_LIST, [])
|
||||
self._lst_vswitch_off = config_entry.get(CONF_VSWITCH_OFF_CMD_LIST, [])
|
||||
|
||||
delta_cycle = self._cycle_min * 60 / len(lst_switches)
|
||||
for idx, switch in enumerate(lst_switches):
|
||||
vswitch_on = self._lst_vswitch_on[idx] if idx < len(self._lst_vswitch_on) else None
|
||||
vswitch_off = self._lst_vswitch_off[idx] if idx < len(self._lst_vswitch_off) else None
|
||||
self._underlyings.append(
|
||||
UnderlyingSwitch(
|
||||
hass=self._hass,
|
||||
@@ -86,10 +99,11 @@ class ThermostatOverSwitch(BaseThermostat[UnderlyingSwitch]):
|
||||
switch_entity_id=switch,
|
||||
initial_delay_sec=idx * delta_cycle,
|
||||
keep_alive_sec=config_entry.get(CONF_HEATER_KEEP_ALIVE, 0),
|
||||
vswitch_on=vswitch_on,
|
||||
vswitch_off=vswitch_off,
|
||||
)
|
||||
)
|
||||
|
||||
self._is_inversed = config_entry.get(CONF_INVERSE_SWITCH) is True
|
||||
self._should_relaunch_control_heating = False
|
||||
|
||||
@overrides
|
||||
@@ -142,6 +156,9 @@ class ThermostatOverSwitch(BaseThermostat[UnderlyingSwitch]):
|
||||
"calculated_on_percent"
|
||||
] = self._prop_algorithm.calculated_on_percent
|
||||
|
||||
self._attr_extra_state_attributes["vswitch_on_commands"] = self._lst_vswitch_on
|
||||
self._attr_extra_state_attributes["vswitch_off_commands"] = self._lst_vswitch_off
|
||||
|
||||
self.async_write_ha_state()
|
||||
_LOGGER.debug(
|
||||
"%s - Calling update_custom_attributes: %s",
|
||||
|
||||
@@ -96,6 +96,7 @@ class ThermostatOverValve(BaseThermostat[UnderlyingValve]): # pylint: disable=a
|
||||
self._tpi_coef_ext,
|
||||
self._cycle_min,
|
||||
self._minimal_activation_delay,
|
||||
self._minimal_deactivation_delay,
|
||||
self.name,
|
||||
max_on_percent=self._max_on_percent,
|
||||
)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"main": {
|
||||
"title": "Add new Versatile Thermostat",
|
||||
"description": "Main mandatory attributes",
|
||||
"description": "Main mandatory attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/base-attributes.md)",
|
||||
"data": {
|
||||
"name": "Name",
|
||||
"thermostat_type": "Thermostat type",
|
||||
@@ -71,7 +71,7 @@
|
||||
},
|
||||
"type": {
|
||||
"title": "Linked entities",
|
||||
"description": "Linked entities attributes",
|
||||
"description": "Linked entities attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/over-switch.md#configuration)",
|
||||
"data": {
|
||||
"underlying_entity_ids": "The device(s) to be controlled",
|
||||
"heater_keep_alive": "Switch keep-alive interval in seconds",
|
||||
@@ -82,7 +82,11 @@
|
||||
"auto_regulation_periode_min": "Regulation minimum period",
|
||||
"auto_regulation_use_device_temp": "Use internal temperature of the underlying",
|
||||
"inverse_switch_command": "Inverse switch command",
|
||||
"auto_fan_mode": "Auto fan mode"
|
||||
"auto_fan_mode": "Auto fan mode",
|
||||
"on_command_text": "Turn on command customization",
|
||||
"vswitch_on_command": "Optional turn on commands",
|
||||
"off_command_text": "Turn off command customization",
|
||||
"vswitch_off_command": "Optional turn off commands"
|
||||
},
|
||||
"data_description": {
|
||||
"underlying_entity_ids": "The device(s) to be controlled - 1 is required",
|
||||
@@ -94,12 +98,13 @@
|
||||
"auto_regulation_periode_min": "Duration in minutes between two regulation update",
|
||||
"auto_regulation_use_device_temp": "Use the eventual internal temperature sensor of the underlying to speedup the self-regulation",
|
||||
"inverse_switch_command": "For switch with pilot wire and diode you may need to inverse the command",
|
||||
"auto_fan_mode": "Automatically activate fan when huge heating/cooling is necessary"
|
||||
"auto_fan_mode": "Automatically activate fan when huge heating/cooling is necessary",
|
||||
"on_command_text": "For underlying of type `select` or `climate` you have to customize the commands."
|
||||
}
|
||||
},
|
||||
"tpi": {
|
||||
"title": "TPI",
|
||||
"description": "Time Proportional Integral attributes",
|
||||
"description": "Time Proportional Integral attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/algorithms.md#lalgorithme-tpi)",
|
||||
"data": {
|
||||
"tpi_coef_int": "coef_int",
|
||||
"tpi_coef_ext": "coef_ext",
|
||||
@@ -113,14 +118,14 @@
|
||||
},
|
||||
"presets": {
|
||||
"title": "Presets",
|
||||
"description": "Select if the thermostat will use central preset - deselect for the thermostat to have its own presets",
|
||||
"description": "Select if the thermostat will use central preset - deselect for the thermostat to have its own presets [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-presets.md)",
|
||||
"data": {
|
||||
"use_presets_central_config": "Use central presets configuration"
|
||||
}
|
||||
},
|
||||
"window": {
|
||||
"title": "Window management",
|
||||
"description": "Open window management.\nYou can also configure automatic window open detection based on temperature decrease",
|
||||
"description": "Open window management.\nYou can also configure automatic window open detection based on temperature decrease [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-window.md)",
|
||||
"data": {
|
||||
"window_sensor_entity_id": "Window sensor entity id",
|
||||
"window_delay": "Window sensor 'on' delay (seconds)",
|
||||
@@ -144,7 +149,7 @@
|
||||
},
|
||||
"motion": {
|
||||
"title": "Motion management",
|
||||
"description": "Motion sensor management. Preset can switch automatically depending on motion detection\nmotion_preset and no_motion_preset should be set to the corresponding preset name",
|
||||
"description": "Motion sensor management. Preset can switch automatically depending on motion detection\nmotion_preset and no_motion_preset should be set to the corresponding preset name [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-motion.md)",
|
||||
"data": {
|
||||
"motion_sensor_entity_id": "Motion sensor entity id",
|
||||
"motion_delay": "Activation delay",
|
||||
@@ -164,7 +169,7 @@
|
||||
},
|
||||
"power": {
|
||||
"title": "Power management",
|
||||
"description": "Power management attributes.\nGives the power and max power sensor of your home.\nSpecify the power consumption of the heater when on.\nAll sensors and device power should use the same unit (kW or W).",
|
||||
"description": "Power management attributes.\nGives the power and max power sensor of your home.\nSpecify the power consumption of the heater when on.\nAll sensors and device power should use the same unit (kW or W) [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-power.md)",
|
||||
"data": {
|
||||
"power_sensor_entity_id": "Power",
|
||||
"max_power_sensor_entity_id": "Max power",
|
||||
@@ -180,7 +185,7 @@
|
||||
},
|
||||
"presence": {
|
||||
"title": "Presence management",
|
||||
"description": "Presence management attributes.\nGives the a presence sensor of your home (true is someone is present) and give the corresponding temperature preset setting.",
|
||||
"description": "Presence management attributes.\nGives the a presence sensor of your home (true is someone is present) and give the corresponding temperature preset setting [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-presence.md)",
|
||||
"data": {
|
||||
"presence_sensor_entity_id": "Presence sensor",
|
||||
"use_presence_central_config": "Use central presence temperature configuration. Deselect to use specific temperature entities"
|
||||
@@ -191,9 +196,10 @@
|
||||
},
|
||||
"advanced": {
|
||||
"title": "Advanced parameters",
|
||||
"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.",
|
||||
"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 [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)",
|
||||
"data": {
|
||||
"minimal_activation_delay": "Minimum activation delay",
|
||||
"minimal_deactivation_delay": "Minimal deactivation delay",
|
||||
"safety_delay_min": "Safety delay (in minutes)",
|
||||
"safety_min_on_percent": "Minimum power percent to enable safety mode",
|
||||
"safety_default_on_percent": "Power percent to use in safety mode",
|
||||
@@ -201,6 +207,7 @@
|
||||
},
|
||||
"data_description": {
|
||||
"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_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",
|
||||
@@ -209,7 +216,7 @@
|
||||
},
|
||||
"central_boiler": {
|
||||
"title": "Control of the central boiler",
|
||||
"description": "Enter the services to call to turn on/off the central boiler. Leave blank if no service call is to be made (in this case, you will have to manage the turning on/off of your central boiler yourself). The service called must be formatted as follows: `entity_id/service_name[/attribute:value]` (/attribute:value is optional)\nFor example:\n- to turn on a switch: `switch.controle_chaudiere/switch.turn_on`\n- to turn off a switch: `switch.controle_chaudiere/switch.turn_off`\n- to program the boiler to 25° and thus force its ignition: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- to send 10° to the boiler and thus force its extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10`",
|
||||
"description": "Enter the services to call to turn on/off the central boiler. Leave blank if no service call is to be made (in this case, you will have to manage the turning on/off of your central boiler yourself). The service called must be formatted as follows: `entity_id/service_name[/attribute:value]` (/attribute:value is optional)\nFor example:\n- to turn on a switch: `switch.controle_chaudiere/switch.turn_on`\n- to turn off a switch: `switch.controle_chaudiere/switch.turn_off`\n- to program the boiler to 25° and thus force its ignition: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- to send 10° to the boiler and thus force its extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10` [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-central-boiler.md)",
|
||||
"data": {
|
||||
"central_boiler_activation_service": "Command to turn-on",
|
||||
"central_boiler_deactivation_service": "Command to turn-off"
|
||||
@@ -221,7 +228,7 @@
|
||||
},
|
||||
"valve_regulation": {
|
||||
"title": "Self-regulation with valve",
|
||||
"description": "Configuration for self-regulation with direct control of the valve",
|
||||
"description": "Configuration for self-regulation with direct control of the valve [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/self-regulation.md#auto-régulation-par-contrôle-direct-de-la-vanne)",
|
||||
"data": {
|
||||
"offset_calibration_entity_ids": "Offset calibration entities",
|
||||
"opening_degree_entity_ids": "Opening degree entities",
|
||||
@@ -234,7 +241,7 @@
|
||||
"opening_degree_entity_ids": "The list of the 'opening degree' entities. There should be one per underlying climate entities",
|
||||
"closing_degree_entity_ids": "The list of the 'closing degree' entities. Set it if your TRV has the entity for better regulation. There should be one per underlying climate entities",
|
||||
"proportional_function": "Algorithm to use (TPI is the only one for now)",
|
||||
"min_opening_degrees": "A comma seperated list of minimal opening degrees. Default to 0. Example: 20, 25, 30"
|
||||
"min_opening_degrees": "Opening degree minimum value for each underlying device, comma separated. Default to 0. Example: 20, 25, 30"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -283,7 +290,7 @@
|
||||
},
|
||||
"main": {
|
||||
"title": "Main - {name}",
|
||||
"description": "Main mandatory attributes",
|
||||
"description": "Main mandatory attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/base-attributes.md)",
|
||||
"data": {
|
||||
"name": "Name",
|
||||
"thermostat_type": "Thermostat type",
|
||||
@@ -319,7 +326,7 @@
|
||||
},
|
||||
"type": {
|
||||
"title": "Entities - {name}",
|
||||
"description": "Linked entities attributes",
|
||||
"description": "Linked entities attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/over-switch.md#configuration)",
|
||||
"data": {
|
||||
"underlying_entity_ids": "The device(s) to be controlled",
|
||||
"heater_keep_alive": "Switch keep-alive interval in seconds",
|
||||
@@ -330,7 +337,11 @@
|
||||
"auto_regulation_periode_min": "Regulation minimum period",
|
||||
"auto_regulation_use_device_temp": "Use internal temperature of the underlying",
|
||||
"inverse_switch_command": "Inverse switch command",
|
||||
"auto_fan_mode": "Auto fan mode"
|
||||
"auto_fan_mode": "Auto fan mode",
|
||||
"on_command_text": "Turn on command customization",
|
||||
"vswitch_on_command": "Optional turn on commands",
|
||||
"off_command_text": "Turn off command customization",
|
||||
"vswitch_off_command": "Optional turn off commands"
|
||||
},
|
||||
"data_description": {
|
||||
"underlying_entity_ids": "The device(s) to be controlled - 1 is required",
|
||||
@@ -341,13 +352,14 @@
|
||||
"auto_regulation_dtemp": "The threshold in ° (or % for valve) under which the temperature change will not be sent",
|
||||
"auto_regulation_periode_min": "Duration in minutes between two regulation update",
|
||||
"auto_regulation_use_device_temp": "Use the eventual internal temperature sensor of the underlying to speedup the self-regulation",
|
||||
"inverse_switch_command": "For switch with pilot wire and diode you may need to invert the command",
|
||||
"auto_fan_mode": "Automatically activate fan when huge heating/cooling is necessary"
|
||||
"inverse_switch_command": "For switch with pilot wire and diode you may need to inverse the command",
|
||||
"auto_fan_mode": "Automatically activate fan when huge heating/cooling is necessary",
|
||||
"on_command_text": "For underlying of type `select` or `climate` you have to customize the commands."
|
||||
}
|
||||
},
|
||||
"tpi": {
|
||||
"title": "TPI - {name}",
|
||||
"description": "Time Proportional Integral attributes",
|
||||
"description": "Time Proportional Integral attributes [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/algorithms.md#lalgorithme-tpi)",
|
||||
"data": {
|
||||
"tpi_coef_int": "coef_int",
|
||||
"tpi_coef_ext": "coef_ext",
|
||||
@@ -361,14 +373,14 @@
|
||||
},
|
||||
"presets": {
|
||||
"title": "Presets - {name}",
|
||||
"description": "Check if the thermostat will use central presets. Uncheck and the thermostat will have its own preset entities",
|
||||
"description": "Check if the thermostat will use central presets. Uncheck and the thermostat will have its own preset entities [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-presets.md)",
|
||||
"data": {
|
||||
"use_presets_central_config": "Use central presets configuration"
|
||||
}
|
||||
},
|
||||
"window": {
|
||||
"title": "Window - {name}",
|
||||
"description": "Open window management.\nYou can also configure automatic window open detection based on temperature decrease",
|
||||
"description": "Open window management.\nYou can also configure automatic window open detection based on temperature decrease [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-window.md)",
|
||||
"data": {
|
||||
"window_sensor_entity_id": "Window sensor entity id",
|
||||
"window_delay": "Window sensor 'on' delay (seconds)",
|
||||
@@ -391,7 +403,7 @@
|
||||
},
|
||||
"motion": {
|
||||
"title": "Motion - {name}",
|
||||
"description": "Motion management. Preset can switch automatically depending of a motion detection\nmotion_preset and no_motion_preset should be set to the corresponding preset name",
|
||||
"description": "Motion management. Preset can switch automatically depending of a motion detection\nmotion_preset and no_motion_preset should be set to the corresponding preset name [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-motion.md)",
|
||||
"data": {
|
||||
"motion_sensor_entity_id": "Motion sensor entity id",
|
||||
"motion_delay": "Activation delay",
|
||||
@@ -411,7 +423,7 @@
|
||||
},
|
||||
"power": {
|
||||
"title": "Power - {name}",
|
||||
"description": "Power management attributes.\nGives the power and max power sensor of your home.\nThen specify the power consumption of the heater when on.\nAll sensors and device power should have the same unit (kW or W).",
|
||||
"description": "Power management attributes.\nGives the power and max power sensor of your home.\nSpecify the power consumption of the heater when on.\nAll sensors and device power should use the same unit (kW or W) [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-power.md)",
|
||||
"data": {
|
||||
"power_sensor_entity_id": "Power",
|
||||
"max_power_sensor_entity_id": "Max power",
|
||||
@@ -427,7 +439,7 @@
|
||||
},
|
||||
"presence": {
|
||||
"title": "Presence - {name}",
|
||||
"description": "Presence management attributes.\nGives the a presence sensor of your home (true is someone is present) and give the corresponding temperature preset setting.",
|
||||
"description": "Presence management attributes.\nGives the a presence sensor of your home (true is someone is present) and give the corresponding temperature preset setting [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-presence.md)",
|
||||
"data": {
|
||||
"presence_sensor_entity_id": "Presence sensor",
|
||||
"use_presence_central_config": "Use central presence temperature configuration. Uncheck to use specific temperature entities"
|
||||
@@ -438,7 +450,7 @@
|
||||
},
|
||||
"advanced": {
|
||||
"title": "Advanced - {name}",
|
||||
"description": "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.",
|
||||
"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 [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/en/feature-advanced.md)",
|
||||
"data": {
|
||||
"minimal_activation_delay": "Minimum activation delay",
|
||||
"safety_delay_min": "Safety delay (in minutes)",
|
||||
@@ -456,7 +468,7 @@
|
||||
},
|
||||
"central_boiler": {
|
||||
"title": "Control of the central boiler - {name}",
|
||||
"description": "Enter the services to call to turn on/off the central boiler. Leave blank if no service call is to be made (in this case, you will have to manage the turning on/off of your central boiler yourself). The service called must be formatted as follows: `entity_id/service_name[/attribute:value]` (/attribute:value is optional)\nFor example:\n- to turn on a switch: `switch.controle_chaudiere/switch.turn_on`\n- to turn off a switch: `switch.controle_chaudiere/switch.turn_off`\n- to program the boiler to 25° and thus force its ignition: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- to send 10° to the boiler and thus force its extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10`",
|
||||
"description": "Enter the services to call to turn on/off the central boiler. Leave blank if no service call is to be made (in this case, you will have to manage the turning on/off of your central boiler yourself). The service called must be formatted as follows: `entity_id/service_name[/attribute:value]` (/attribute:value is optional)\nFor example:\n- to turn on a switch: `switch.controle_chaudiere/switch.turn_on`\n- to turn off a switch: `switch.controle_chaudiere/switch.turn_off`\n- to program the boiler to 25° and thus force its ignition: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- to send 10° to the boiler and thus force its extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10` [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-central-boiler.md)",
|
||||
"data": {
|
||||
"central_boiler_activation_service": "Command to turn-on",
|
||||
"central_boiler_deactivation_service": "Command to turn-off"
|
||||
@@ -468,7 +480,7 @@
|
||||
},
|
||||
"valve_regulation": {
|
||||
"title": "Self-regulation with valve - {name}",
|
||||
"description": "Configuration for self-regulation with direct control of the valve",
|
||||
"description": "Configuration for self-regulation with direct control of the valve [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/self-regulation.md#auto-régulation-par-contrôle-direct-de-la-vanne)",
|
||||
"data": {
|
||||
"offset_calibration_entity_ids": "Offset calibration entities",
|
||||
"opening_degree_entity_ids": "Opening degree entities",
|
||||
@@ -481,7 +493,7 @@
|
||||
"opening_degree_entity_ids": "The list of the 'opening degree' entities. There should be one per underlying climate entities",
|
||||
"closing_degree_entity_ids": "The list of the 'closing degree' entities. Set it if your TRV has the entity for better regulation. There should be one per underlying climate entities",
|
||||
"proportional_function": "Algorithm to use (TPI is the only one for now)",
|
||||
"min_opening_degrees": "A comma seperated list of minimal opening degrees. Default to 0. Example: 20, 25, 30"
|
||||
"min_opening_degrees": "Opening degree minimum value for each underlying device, comma separated. Default to 0. Example: 20, 25, 30"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -559,7 +571,7 @@
|
||||
"preset_mode": {
|
||||
"state": {
|
||||
"power": "Shedding",
|
||||
"security": "Safety",
|
||||
"safety": "Safety",
|
||||
"none": "Manual",
|
||||
"frost": "Frost"
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"step": {
|
||||
"user": {
|
||||
"title": "Type du nouveau Versatile Thermostat",
|
||||
"description": "Choisissez le type de thermostat que vous voulez créer [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/creation.md)",
|
||||
"data": {
|
||||
"thermostat_type": "Type de thermostat"
|
||||
},
|
||||
@@ -35,7 +36,7 @@
|
||||
},
|
||||
"main": {
|
||||
"title": "Ajout d'un nouveau thermostat",
|
||||
"description": "Principaux attributs obligatoires",
|
||||
"description": "Principaux attributs obligatoires [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/base-attributes.md)",
|
||||
"data": {
|
||||
"name": "Nom",
|
||||
"thermostat_type": "Type de thermostat",
|
||||
@@ -71,7 +72,7 @@
|
||||
},
|
||||
"type": {
|
||||
"title": "Entité(s) liée(s)",
|
||||
"description": "Attributs de(s) l'entité(s) liée(s)",
|
||||
"description": "Attributs de(s) l'entité(s) liée(s) [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/over-switch.md#configuration)",
|
||||
"data": {
|
||||
"underlying_entity_ids": "Les équipements à controller",
|
||||
"heater_keep_alive": "keep-alive (sec)",
|
||||
@@ -82,7 +83,11 @@
|
||||
"auto_regulation_periode_min": "Période minimale de régulation",
|
||||
"auto_regulation_use_device_temp": "Compenser la température interne du sous-jacent",
|
||||
"inverse_switch_command": "Inverser la commande",
|
||||
"auto_fan_mode": " Auto ventilation mode"
|
||||
"auto_fan_mode": " Auto ventilation mode",
|
||||
"on_command_text": "Personnalisation des commandes d'allumage",
|
||||
"vswitch_on_command": "Commande d'allumage (optionnel)",
|
||||
"off_command_text": "Personnalisation des commandes d'extinction",
|
||||
"vswitch_off_command": "Commande d'extinction (optionnel)"
|
||||
},
|
||||
"data_description": {
|
||||
"underlying_entity_ids": "La liste des équipements qui seront controlés par ce VTherm",
|
||||
@@ -94,12 +99,13 @@
|
||||
"auto_regulation_periode_min": "La durée en minutes entre deux mise à jour faites par la régulation",
|
||||
"auto_regulation_use_device_temp": "Compenser la temperature interne du sous-jacent pour accélérer l'auto-régulation",
|
||||
"inverse_switch_command": "Inverse la commande du switch pour une installation avec fil pilote et diode",
|
||||
"auto_fan_mode": "Active la ventilation automatiquement en cas d'écart important"
|
||||
"auto_fan_mode": "Active la ventilation automatiquement en cas d'écart important",
|
||||
"on_command_text": "Pour les sous-jacents de type `select` ou `climate` vous devez personnaliser les commandes."
|
||||
}
|
||||
},
|
||||
"tpi": {
|
||||
"title": "TPI",
|
||||
"description": "Attributs de l'algo Time Proportional Integral",
|
||||
"description": "Attributs de l'algo Time Proportional Integral [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/algorithms.md#lalgorithme-tpi)",
|
||||
"data": {
|
||||
"tpi_coef_int": "coeff_int",
|
||||
"tpi_coef_ext": "coeff_ext",
|
||||
@@ -113,14 +119,14 @@
|
||||
},
|
||||
"presets": {
|
||||
"title": "Pre-réglages",
|
||||
"description": "Cochez pour que ce thermostat utilise les pré-réglages de la configuration centrale. Décochez pour utiliser des entités de température spécifiques",
|
||||
"description": "Cochez pour que ce thermostat utilise les pré-réglages de la configuration centrale. Décochez pour utiliser des entités de température spécifiques [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-presets.md)",
|
||||
"data": {
|
||||
"use_presets_central_config": "Utiliser la configuration des pré-réglages centrale"
|
||||
}
|
||||
},
|
||||
"window": {
|
||||
"title": "Gestion d'une ouverture",
|
||||
"description": "Coupe le radiateur si l'ouverture est ouverte.\nLaissez l'id d'entité vide pour utiliser la détection automatique.",
|
||||
"description": "Coupe le radiateur si l'ouverture est ouverte.\nLaissez l'id d'entité vide pour utiliser la détection automatique [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-window.md)",
|
||||
"data": {
|
||||
"window_sensor_entity_id": "Détecteur d'ouverture (entity id)",
|
||||
"window_delay": "Délai de prise en compte à l'ouverture (secondes)",
|
||||
@@ -144,7 +150,7 @@
|
||||
},
|
||||
"motion": {
|
||||
"title": "Gestion de la détection de mouvement",
|
||||
"description": "Le preset s'ajuste automatiquement si un mouvement est détecté\n'Preset mouvement' et 'Preset sans mouvement' doivent être choisis avec les preset à utiliser.",
|
||||
"description": "Le preset s'ajuste automatiquement si un mouvement est détecté\n'Preset mouvement' et 'Preset sans mouvement' doivent être choisis avec les preset à utiliser [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-motion.md)",
|
||||
"data": {
|
||||
"motion_sensor_entity_id": "Détecteur de mouvement",
|
||||
"motion_delay": "Délai d'activation",
|
||||
@@ -155,7 +161,7 @@
|
||||
},
|
||||
"data_description": {
|
||||
"motion_sensor_entity_id": "Id d'entité du détecteur de mouvement",
|
||||
"motion_delay": "Délai avant activation lorsqu'un mouvement est détecté (secondss)",
|
||||
"motion_delay": "Délai avant activation lorsqu'un mouvement est détecté (secondes)",
|
||||
"motion_off_delai": "Délai avant désactivation lorsqu'aucun mouvement n'est détecté (secondes)",
|
||||
"motion_preset": "Preset à utiliser si mouvement détecté",
|
||||
"no_motion_preset": "Preset à utiliser si pas de mouvement détecté",
|
||||
@@ -164,7 +170,7 @@
|
||||
},
|
||||
"power": {
|
||||
"title": "Gestion de la puissance",
|
||||
"description": "Sélectionne automatiquement le preset 'power' si la puissance consommée est supérieure à un maximum.\nDonnez les entity id des capteurs qui mesurent la puissance totale et la puissance max autorisée.\nEnsuite donnez la puissance de l'équipement.\nTous les capteurs et la puissance consommée par l'équipement doivent avoir la même unité de mesure (kW ou W).",
|
||||
"description": "Sélectionne automatiquement le preset 'power' si la puissance consommée est supérieure à un maximum.\nDonnez les entity id des capteurs qui mesurent la puissance totale et la puissance max autorisée.\nEnsuite donnez la puissance de l'équipement.\nTous les capteurs et la puissance consommée par l'équipement doivent avoir la même unité de mesure (kW ou W) [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-power.md)",
|
||||
"data": {
|
||||
"power_sensor_entity_id": "Capteur de puissance totale (entity id)",
|
||||
"max_power_sensor_entity_id": "Capteur de puissance Max (entity id)",
|
||||
@@ -179,8 +185,8 @@
|
||||
}
|
||||
},
|
||||
"presence": {
|
||||
"title": "Gestion de la présence",
|
||||
"description": "Donnez un capteur de présence (true si quelqu'un est présent) et les températures cibles à utiliser en cas d'abs.",
|
||||
"title": "Gestion de la présenc",
|
||||
"description": "Donnez un capteur de présence (true si quelqu'un est présent) et les températures cibles à utiliser en cas d'absence [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-presence.md)",
|
||||
"data": {
|
||||
"presence_sensor_entity_id": "Capteur de présence",
|
||||
"use_presence_central_config": "Utiliser la configuration centrale des températures en cas d'absence. Décochez pour avoir des entités de température dédiées"
|
||||
@@ -191,16 +197,18 @@
|
||||
},
|
||||
"advanced": {
|
||||
"title": "Parameters avancés",
|
||||
"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.",
|
||||
"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 [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-advanced.md)",
|
||||
"data": {
|
||||
"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_min_on_percent": "Pourcentage minimal de puissance",
|
||||
"safety_default_on_percent": "Pourcentage de puissance a utiliser en mode securité",
|
||||
"use_advanced_central_config": "Utiliser la configuration centrale avancée"
|
||||
},
|
||||
"data_description": {
|
||||
"minimal_activation_delay": "Délai en seondes 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_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é",
|
||||
@@ -209,7 +217,7 @@
|
||||
},
|
||||
"central_boiler": {
|
||||
"title": "Contrôle de la chaudière centrale",
|
||||
"description": "Donnez les services à appeler pour allumer/éteindre la chaudière centrale. Laissez vide, si aucun appel de service ne doit être effectué (dans ce cas, vous devrez gérer vous même l'allumage/extinction de votre chaudière centrale). Le service a appelé doit être formatté comme suit: `entity_id/service_name[/attribut:valeur]` (/attribut:valeur est facultatif)\nPar exemple:\n- pour allumer un switch: `switch.controle_chaudiere/switch.turn_on`\n- pour éteindre un switch: `switch.controle_chaudiere/switch.turn_off`\n- pour programmer la chaudière sur 25° et ainsi forcer son allumage: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- pour envoyer 10° à la chaudière et ainsi forcer son extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10`",
|
||||
"description": "Donnez les services à appeler pour allumer/éteindre la chaudière centrale. Laissez vide, si aucun appel de service ne doit être effectué (dans ce cas, vous devrez gérer vous même l'allumage/extinction de votre chaudière centrale). Le service a appelé doit être formatté comme suit: `entity_id/service_name[/attribut:valeur]` (/attribut:valeur est facultatif)\nPar exemple:\n- pour allumer un switch: `switch.controle_chaudiere/switch.turn_on`\n- pour éteindre un switch: `switch.controle_chaudiere/switch.turn_off`\n- pour programmer la chaudière sur 25° et ainsi forcer son allumage: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- pour envoyer 10° à la chaudière et ainsi forcer son extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10` [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-central-boiler.md)",
|
||||
"data": {
|
||||
"central_boiler_activation_service": "Commande pour allumer",
|
||||
"central_boiler_deactivation_service": "Commande pour éteindre"
|
||||
@@ -221,7 +229,7 @@
|
||||
},
|
||||
"valve_regulation": {
|
||||
"title": "Auto-régulation par vanne",
|
||||
"description": "Configuration de l'auto-régulation par controle direct de la vanne",
|
||||
"description": "Configuration de l'auto-régulation par controle direct de la vanne [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/self-regulation.md#auto-régulation-par-contrôle-direct-de-la-vanne)",
|
||||
"data": {
|
||||
"offset_calibration_entity_ids": "Entités de 'calibrage du décalage''",
|
||||
"opening_degree_entity_ids": "Entités 'ouverture de vanne'",
|
||||
@@ -253,6 +261,7 @@
|
||||
"step": {
|
||||
"user": {
|
||||
"title": "Type - {name}",
|
||||
"description": "Choisissez le type de thermostat que vous voulez créer [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/creation.md)",
|
||||
"data": {
|
||||
"thermostat_type": "Type de thermostat"
|
||||
},
|
||||
@@ -283,7 +292,7 @@
|
||||
},
|
||||
"main": {
|
||||
"title": "Attributs - {name}",
|
||||
"description": "Principaux attributs obligatoires",
|
||||
"description": "Principaux attributs obligatoires [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/base-attributes.md)",
|
||||
"data": {
|
||||
"name": "Nom",
|
||||
"thermostat_type": "Type de thermostat",
|
||||
@@ -319,7 +328,7 @@
|
||||
},
|
||||
"type": {
|
||||
"title": "Entité(s) liée(s) - {name}",
|
||||
"description": "Attributs de(s) l'entité(s) liée(s)",
|
||||
"description": "Attributs de(s) l'entité(s) liée(s) [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/over-switch.md#configuration)",
|
||||
"data": {
|
||||
"underlying_entity_ids": "Les équipements à controller",
|
||||
"heater_keep_alive": "keep-alive (sec)",
|
||||
@@ -330,7 +339,11 @@
|
||||
"auto_regulation_periode_min": "Période minimale de régulation",
|
||||
"auto_regulation_use_device_temp": "Compenser la température interne du sous-jacent",
|
||||
"inverse_switch_command": "Inverser la commande",
|
||||
"auto_fan_mode": " Auto ventilation mode"
|
||||
"auto_fan_mode": " Auto ventilation mode",
|
||||
"on_command_text": "Personnalisation des commandes d'allumage",
|
||||
"vswitch_on_command": "Commande d'allumage (optionnel)",
|
||||
"off_command_text": "Personnalisation des commandes d'extinction",
|
||||
"vswitch_off_command": "Commande d'extinction (optionnel)"
|
||||
},
|
||||
"data_description": {
|
||||
"underlying_entity_ids": "La liste des équipements qui seront controlés par ce VTherm",
|
||||
@@ -342,12 +355,13 @@
|
||||
"auto_regulation_periode_min": "La durée en minutes entre deux mise à jour faites par la régulation",
|
||||
"auto_regulation_use_device_temp": "Compenser la temperature interne du sous-jacent pour accélérer l'auto-régulation",
|
||||
"inverse_switch_command": "Inverse la commande du switch pour une installation avec fil pilote et diode",
|
||||
"auto_fan_mode": "Active la ventilation automatiquement en cas d'écart important"
|
||||
"auto_fan_mode": "Active la ventilation automatiquement en cas d'écart important",
|
||||
"on_command_text": "Pour les sous-jacents de type `select` ou `climate`"
|
||||
}
|
||||
},
|
||||
"tpi": {
|
||||
"title": "TPI - {name}",
|
||||
"description": "Attributs de l'algo Time Proportional Integral",
|
||||
"description": "Attributs de l'algo Time Proportional Integral [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/algorithms.md#lalgorithme-tpi)",
|
||||
"data": {
|
||||
"tpi_coef_int": "coeff_int : Coefficient à utiliser pour le delta de température interne",
|
||||
"tpi_coef_ext": "coeff_ext : Coefficient à utiliser pour le delta de température externe"
|
||||
@@ -355,14 +369,14 @@
|
||||
},
|
||||
"presets": {
|
||||
"title": "Pre-réglages - {name}",
|
||||
"description": "Cochez pour que ce thermostat utilise les pré-réglages de la configuration centrale. Décochez pour utiliser des entités de température spécifiques",
|
||||
"description": "Cochez pour que ce thermostat utilise les pré-réglages de la configuration centrale. Décochez pour utiliser des entités de température spécifiques [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-presets.md)",
|
||||
"data": {
|
||||
"use_presets_central_config": "Utiliser la configuration des pré-réglages centrale"
|
||||
}
|
||||
},
|
||||
"window": {
|
||||
"title": "Ouverture - {name}",
|
||||
"description": "Coupe le radiateur si l'ouverture est ouverte.\nLaissez l'id d'entité vide pour utiliser la détection automatique.",
|
||||
"description": "Coupe le radiateur si l'ouverture est ouverte.\nLaissez l'id d'entité vide pour utiliser la détection automatique [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-window.md)",
|
||||
"data": {
|
||||
"window_sensor_entity_id": "Détecteur d'ouverture (entity id)",
|
||||
"window_delay": "Délai avant extinction (secondes)",
|
||||
@@ -386,7 +400,7 @@
|
||||
},
|
||||
"motion": {
|
||||
"title": "Mouvement - {name}",
|
||||
"description": "Gestion du mouvement. Le preset s'ajuste automatiquement si un mouvement est détecté\n'Preset mouvement' et 'Preset sans mouvement' doivent être choisis avec les preset à utiliser.",
|
||||
"description": "Le preset s'ajuste automatiquement si un mouvement est détecté\n'Preset mouvement' et 'Preset sans mouvement' doivent être choisis avec les preset à utiliser [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-motion.md)",
|
||||
"data": {
|
||||
"motion_sensor_entity_id": "Détecteur de mouvement",
|
||||
"motion_delay": "Délai d'activation",
|
||||
@@ -406,7 +420,7 @@
|
||||
},
|
||||
"power": {
|
||||
"title": "Puissance - {name}",
|
||||
"description": "Gestion de la puissance. Sélectionne automatiquement le preset 'power' si la puissance consommée est supérieure à un maximum. Tous les capteurs et la puissance consommée par l'équipement doivent avoir la même unité de mesure (kW ou W).",
|
||||
"description": "Sélectionne automatiquement le preset 'power' si la puissance consommée est supérieure à un maximum.\nDonnez les entity id des capteurs qui mesurent la puissance totale et la puissance max autorisée.\nEnsuite donnez la puissance de l'équipement.\nTous les capteurs et la puissance consommée par l'équipement doivent avoir la même unité de mesure (kW ou W) [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-power.md)",
|
||||
"data": {
|
||||
"power_sensor_entity_id": "Puissance totale",
|
||||
"max_power_sensor_entity_id": "Capteur de puissance Max (entity id)",
|
||||
@@ -422,7 +436,7 @@
|
||||
},
|
||||
"presence": {
|
||||
"title": "Présence - {name}",
|
||||
"description": "Donnez un capteur de présence (true si quelqu'un est présent) et les températures cibles à utiliser en cas d'abs.",
|
||||
"description": "Donnez un capteur de présence (true si quelqu'un est présent) et les températures cibles à utiliser en cas d'absence [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-presence.md)",
|
||||
"data": {
|
||||
"presence_sensor_entity_id": "Capteur de présence",
|
||||
"use_presence_central_config": "Utiliser la configuration centrale des températures en cas d'absence. Décochez pour avoir des entités de température dédiées"
|
||||
@@ -433,16 +447,18 @@
|
||||
},
|
||||
"advanced": {
|
||||
"title": "Avancés - {name}",
|
||||
"description": "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.",
|
||||
"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 [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-advanced.md)",
|
||||
"data": {
|
||||
"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_min_on_percent": "Pourcentage minimal de puissance",
|
||||
"safety_default_on_percent": "Pourcentage de puissance a utiliser en mode securité",
|
||||
"use_advanced_central_config": "Utiliser la configuration centrale avancée"
|
||||
},
|
||||
"data_description": {
|
||||
"minimal_activation_delay": "Délai en seondes 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_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é",
|
||||
@@ -451,7 +467,7 @@
|
||||
},
|
||||
"central_boiler": {
|
||||
"title": "Contrôle de la chaudière centrale - {name}",
|
||||
"description": "Donnez les services à appeler pour allumer/éteindre la chaudière centrale. Laissez vide, si aucun appel de service ne doit être effectué (dans ce cas, vous devrez gérer vous même l'allumage/extinction de votre chaudière centrale). Le service a appelé doit être formatté comme suit: `entity_id/service_name[/attribut:valeur]` (/attribut:valeur est facultatif)\nPar exemple:\n- pour allumer un switch: `switch.controle_chaudiere/switch.turn_on`\n- pour éteindre un switch: `switch.controle_chaudiere/switch.turn_off`\n- pour programmer la chaudière sur 25° et ainsi forcer son allumage: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- pour envoyer 10° à la chaudière et ainsi forcer son extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10`",
|
||||
"description": "Donnez les services à appeler pour allumer/éteindre la chaudière centrale. Laissez vide, si aucun appel de service ne doit être effectué (dans ce cas, vous devrez gérer vous même l'allumage/extinction de votre chaudière centrale). Le service a appelé doit être formatté comme suit: `entity_id/service_name[/attribut:valeur]` (/attribut:valeur est facultatif)\nPar exemple:\n- pour allumer un switch: `switch.controle_chaudiere/switch.turn_on`\n- pour éteindre un switch: `switch.controle_chaudiere/switch.turn_off`\n- pour programmer la chaudière sur 25° et ainsi forcer son allumage: `climate.thermostat_chaudiere/climate.set_temperature/temperature:25`\n- pour envoyer 10° à la chaudière et ainsi forcer son extinction: `climate.thermostat_chaudiere/climate.set_temperature/temperature:10` [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/feature-central-boiler.md)",
|
||||
"data": {
|
||||
"central_boiler_activation_service": "Commande pour allumer",
|
||||
"central_boiler_deactivation_service": "Commande pour éteindre"
|
||||
@@ -463,7 +479,7 @@
|
||||
},
|
||||
"valve_regulation": {
|
||||
"title": "Auto-régulation par vanne - {name}",
|
||||
"description": "Configuration de l'auto-régulation par controle direct de la vanne",
|
||||
"description": "Configuration de l'auto-régulation par controle direct de la vanne [](https://github.com/jmcollin78/versatile_thermostat/blob/main/documentation/fr/self-regulation.md#auto-régulation-par-contrôle-direct-de-la-vanne)",
|
||||
"data": {
|
||||
"offset_calibration_entity_ids": "Entités de 'calibrage du décalage''",
|
||||
"opening_degree_entity_ids": "Entités 'ouverture de vanne'",
|
||||
@@ -487,7 +503,8 @@
|
||||
"no_central_config": "Vous ne pouvez pas cocher 'Utiliser la configuration centrale' car aucune configuration centrale n'a été trouvée. Vous devez créer un Versatile Thermostat de type 'Central Configuration' pour pouvoir l'utiliser.",
|
||||
"service_configuration_format": "Mauvais format de la configuration du service",
|
||||
"valve_regulation_nb_entities_incorrect": "Le nombre d'entités pour la régulation par vanne doit être égal au nombre d'entité sous-jacentes",
|
||||
"min_opening_degrees_format": "Une liste d'entiers positifs séparés par des ',' est attendu. Exemple : 20, 25, 30"
|
||||
"min_opening_degrees_format": "Une liste d'entiers positifs séparés par des ',' est attendu. Exemple : 20, 25, 30",
|
||||
"vswitch_configuration_incorrect": "La configuration de la personnalisation des commandes est incorrecte. Elle est obligatoire pour les sous-jacents non switch et le format doit être 'service_name[/attribut:valeur]'. Plus d'informations dans le README."
|
||||
},
|
||||
"abort": {
|
||||
"already_configured": "Le device est déjà configuré"
|
||||
@@ -554,7 +571,7 @@
|
||||
"preset_mode": {
|
||||
"state": {
|
||||
"power": "Délestage",
|
||||
"security": "Sécurité",
|
||||
"safety": "Sécurité",
|
||||
"none": "Manuel",
|
||||
"frost": "Hors Gel"
|
||||
}
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
""" Underlying entities classes """
|
||||
import logging
|
||||
from typing import Any
|
||||
import re
|
||||
from typing import Any, Dict, Tuple
|
||||
|
||||
from enum import StrEnum
|
||||
|
||||
from homeassistant.const import ATTR_ENTITY_ID, STATE_ON, STATE_UNAVAILABLE
|
||||
from homeassistant.const import ATTR_ENTITY_ID, STATE_ON, STATE_OFF, STATE_UNAVAILABLE
|
||||
from homeassistant.core import State
|
||||
|
||||
from homeassistant.exceptions import ServiceNotFound
|
||||
@@ -209,17 +211,8 @@ class UnderlyingEntity:
|
||||
class UnderlyingSwitch(UnderlyingEntity):
|
||||
"""Represent a underlying switch"""
|
||||
|
||||
_initialDelaySec: int
|
||||
_on_time_sec: int
|
||||
_off_time_sec: int
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
thermostat: Any,
|
||||
switch_entity_id: str,
|
||||
initial_delay_sec: int,
|
||||
keep_alive_sec: float,
|
||||
self, hass: HomeAssistant, thermostat: Any, switch_entity_id: str, initial_delay_sec: int, keep_alive_sec: float, vswitch_on: str = None, vswitch_off: str = None
|
||||
) -> None:
|
||||
"""Initialize the underlying switch"""
|
||||
|
||||
@@ -235,6 +228,14 @@ class UnderlyingSwitch(UnderlyingEntity):
|
||||
self._on_time_sec = 0
|
||||
self._off_time_sec = 0
|
||||
self._keep_alive = IntervalCaller(hass, keep_alive_sec)
|
||||
self._vswitch_on = vswitch_on.strip() if vswitch_on else None
|
||||
self._vswitch_off = vswitch_off.strip() if vswitch_off else None
|
||||
self._domain = self._entity_id.split(".")[0]
|
||||
# build command
|
||||
command, data, state_on = self.build_command(use_on=True)
|
||||
self._on_command = {"command": command, "data": data, "state": state_on}
|
||||
command, data, state_off = self.build_command(use_on=False)
|
||||
self._off_command = {"command": command, "data": data, "state": state_off}
|
||||
|
||||
@property
|
||||
def initial_delay_sec(self):
|
||||
@@ -243,7 +244,7 @@ class UnderlyingSwitch(UnderlyingEntity):
|
||||
|
||||
@overrides
|
||||
@property
|
||||
def is_inversed(self):
|
||||
def is_inversed(self) -> bool:
|
||||
"""Tells if the switch command should be inversed"""
|
||||
return self._thermostat.is_inversed
|
||||
|
||||
@@ -275,10 +276,15 @@ class UnderlyingSwitch(UnderlyingEntity):
|
||||
@property
|
||||
def is_device_active(self):
|
||||
"""If the toggleable device is currently active."""
|
||||
real_state = self._hass.states.is_state(self._entity_id, STATE_ON)
|
||||
return (self.is_inversed and not real_state) or (
|
||||
not self.is_inversed and real_state
|
||||
)
|
||||
# real_state = self._hass.states.is_state(self._entity_id, STATE_ON)
|
||||
# return (self.is_inversed and not real_state) or (
|
||||
# not self.is_inversed and real_state
|
||||
# )
|
||||
is_on = self._hass.states.is_state(self._entity_id, self._on_command.get("state"))
|
||||
# if self.is_inversed:
|
||||
# return not is_on
|
||||
|
||||
return is_on
|
||||
|
||||
async def _keep_alive_callback(self):
|
||||
"""Keep alive: Turn on if already turned on, turn off if already turned off."""
|
||||
@@ -305,18 +311,48 @@ class UnderlyingSwitch(UnderlyingEntity):
|
||||
)
|
||||
await (self.turn_on() if self.is_device_active else self.turn_off())
|
||||
|
||||
# @overrides this breaks some unit tests TypeError: object MagicMock can't be used in 'await' expression
|
||||
def build_command(self, use_on: bool) -> Tuple[str, Dict[str, str]]:
|
||||
"""Build a command and returns a command and a dict as data"""
|
||||
|
||||
value = None
|
||||
data = {ATTR_ENTITY_ID: self._entity_id}
|
||||
take_on = (use_on and not self.is_inversed) or (not use_on and self.is_inversed)
|
||||
vswitch = self._vswitch_on if take_on else self._vswitch_off
|
||||
if vswitch:
|
||||
pattern = r"^(?P<command>[^\s/]+)(?:/(?P<argument>[^\s:]+)(?::(?P<value>[^\s]+))?)?$"
|
||||
match = re.match(pattern, vswitch)
|
||||
|
||||
if match:
|
||||
# Extraire les groupes nommés
|
||||
command = match.group("command")
|
||||
argument = match.group("argument")
|
||||
value = match.group("value")
|
||||
if argument is not None and value is not None:
|
||||
data.update({argument: value})
|
||||
else:
|
||||
raise ValueError(f"Invalid input format: {vswitch}. Must be conform to 'command[/argument[:value]]'")
|
||||
|
||||
else:
|
||||
command = SERVICE_TURN_ON if take_on else SERVICE_TURN_OFF
|
||||
|
||||
if value is None:
|
||||
value = STATE_ON if take_on else STATE_OFF
|
||||
|
||||
return command, data, value
|
||||
|
||||
async def turn_off(self):
|
||||
"""Turn heater toggleable device off."""
|
||||
self._keep_alive.cancel() # Cancel early to avoid a turn_on/turn_off race condition
|
||||
_LOGGER.debug("%s - Stopping underlying entity %s", self, self._entity_id)
|
||||
command = SERVICE_TURN_OFF if not self.is_inversed else SERVICE_TURN_ON
|
||||
domain = self._entity_id.split(".")[0]
|
||||
|
||||
command = self._off_command.get("command")
|
||||
data = self._off_command.get("data")
|
||||
|
||||
# This may fails if called after shutdown
|
||||
try:
|
||||
try:
|
||||
data = {ATTR_ENTITY_ID: self._entity_id}
|
||||
await self._hass.services.async_call(domain, command, data)
|
||||
_LOGGER.debug("%s - Sending command %s with data=%s", self, command, data)
|
||||
await self._hass.services.async_call(self._domain, command, data)
|
||||
self._keep_alive.set_async_action(self._keep_alive_callback)
|
||||
except Exception:
|
||||
self._keep_alive.cancel()
|
||||
@@ -332,12 +368,12 @@ class UnderlyingSwitch(UnderlyingEntity):
|
||||
if not await self.check_overpowering():
|
||||
return False
|
||||
|
||||
command = SERVICE_TURN_ON if not self.is_inversed else SERVICE_TURN_OFF
|
||||
domain = self._entity_id.split(".")[0]
|
||||
command = self._on_command.get("command")
|
||||
data = self._on_command.get("data")
|
||||
try:
|
||||
try:
|
||||
data = {ATTR_ENTITY_ID: self._entity_id}
|
||||
await self._hass.services.async_call(domain, command, data)
|
||||
_LOGGER.debug("%s - Sending command %s with data=%s", self, command, data)
|
||||
await self._hass.services.async_call(self._domain, command, data)
|
||||
self._keep_alive.set_async_action(self._keep_alive_callback)
|
||||
return True
|
||||
except Exception:
|
||||
@@ -611,7 +647,7 @@ class UnderlyingClimate(UnderlyingEntity):
|
||||
|
||||
async def set_humidity(self, humidity: int):
|
||||
"""Set new target humidity."""
|
||||
_LOGGER.info("%s - Set fan mode: %s", self, humidity)
|
||||
_LOGGER.info("%s - Set humidity: %s", self, humidity)
|
||||
if not self.is_initialized:
|
||||
return
|
||||
data = {
|
||||
@@ -627,7 +663,7 @@ class UnderlyingClimate(UnderlyingEntity):
|
||||
|
||||
async def set_swing_mode(self, swing_mode):
|
||||
"""Set new target swing operation."""
|
||||
_LOGGER.info("%s - Set fan mode: %s", self, swing_mode)
|
||||
_LOGGER.info("%s - Set swing mode: %s", self, swing_mode)
|
||||
if not self.is_initialized:
|
||||
return
|
||||
data = {
|
||||
|
||||
@@ -25,6 +25,10 @@ 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.
|
||||
|
||||
### 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
|
||||
|
||||
The second delay (`safety_delay_min`) is the maximum time between two temperature measurements before the _VTherm_ switches to Safety Mode.
|
||||
|
||||
BIN
documentation/en/images/config-vswitch1.png
Normal file
BIN
documentation/en/images/config-vswitch1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
documentation/en/images/config-vswitch2.png
Normal file
BIN
documentation/en/images/config-vswitch2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -60,6 +60,8 @@ Of course, your underlying equipment must have ventilation, and it must be contr
|
||||
|
||||
### Compensating for the Internal Temperature of the Underlying Equipment
|
||||
|
||||
Warning: This option must not be used with direct valve control regulation if a calibration entity has been provided.
|
||||
|
||||
Sometimes, the internal thermometer of the underlying equipment (TRV, air conditioner, etc.) is inaccurate to the point that self-regulation is insufficient. This happens when the internal thermometer is placed too close to the heat source. The internal temperature rises much faster than the room temperature, leading to regulation failures.
|
||||
Example:
|
||||
1. Room temperature is 18°, setpoint is 20°.
|
||||
@@ -99,4 +101,4 @@ When this entity is 'On', all temperature or state changes made directly on the
|
||||
Be careful, if you use this feature, your equipment is now controlled in two ways: _VTherm_ and directly by you. The commands might be contradictory, which could lead to confusion about the equipment's state. _VTherm_ is equipped with a delay mechanism that prevents loops: the user gives a setpoint, which is captured by _VTherm_ and changes the setpoint, ... This delay may cause the change made directly on the equipment to be ignored if these changes are too close together in time.
|
||||
|
||||
Some equipment (like Daikin, for example) changes state by itself. If the checkbox is checked, it may turn off the _VTherm_ when that's not what you intended.
|
||||
That's why it's better not to use it. It generates a lot of confusion and many support requests.
|
||||
That's why it's better not to use it. It generates a lot of confusion and many support requests.
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
- [`over_switch` Type Thermostat](#over_switch-type-thermostat)
|
||||
- [Prerequisites](#prerequisites)
|
||||
- [Configuration](#configuration)
|
||||
- [The Underlying Entities](#the-underlying-entities)
|
||||
- [The underlying devices](#the-underlying-devices)
|
||||
- [Keep-Alive](#keep-alive)
|
||||
- [AC Mode](#ac-mode)
|
||||
- [Command Inversion](#command-inversion)
|
||||
- [Command Customization](#command-customization)
|
||||
|
||||
|
||||
## Prerequisites
|
||||
@@ -18,8 +19,8 @@ The installation should look like this:
|
||||
1. The user or automation, or the Scheduler, sets a setpoint via a preset or directly using a temperature.
|
||||
2. Periodically, the internal thermometer (2) or external thermometer (2b) sends the measured temperature. The internal thermometer should be placed in a relevant spot for the user's comfort: ideally in the middle of the living space. Avoid placing it too close to a window or too near the radiator.
|
||||
3. Based on the setpoint values, the different temperatures, and the TPI algorithm parameters (see [TPI](algorithms.md#lalgorithme-tpi)), VTherm will calculate a percentage of the on-time.
|
||||
4. It will then regularly command the turning on and off of the underlying `switch` entities.
|
||||
5. These underlying switch entities will control the physical switch.
|
||||
4. It will then regularly command the turning on and off of the underlying `switch` (or `select` or `climate`) entities.
|
||||
5. These underlying entities will control the physical device.
|
||||
6. The physical switch will turn the radiator on or off.
|
||||
|
||||
> The on-time percentage is recalculated each cycle, which is what allows regulating the room temperature.
|
||||
@@ -31,8 +32,11 @@ Then, click on the "Underlying Entities" option from the menu, and you will see
|
||||
|
||||

|
||||
|
||||
### The Underlying Entities
|
||||
In the "Equipment to Control" list, you should add the switches that will be controlled by VTherm. Only `switch` or `input_boolean` entities are accepted.
|
||||
### The underlying devices
|
||||
|
||||
In the "list of devices to control," you add the switches that will be controlled by VTherm. Only entities of type `switch`, `input_boolean`, `select`, `input_select`, or `climate` are accepted.
|
||||
|
||||
If one of the underlying devices is not a `switch`, then command customization is mandatory. By default, for `switch` entities, the commands are the standard switch on/off commands (`turn_on`, `turn_off`).
|
||||
|
||||
The algorithm currently available is TPI. See [algorithm](#algorithm).
|
||||
If multiple entities are configured, the thermostat staggers the activations to minimize the number of switches on at any given time. This allows for better power distribution, as each radiator will turn on in turn.
|
||||
@@ -53,4 +57,39 @@ It is possible to choose a `thermostat_over_switch` to control an air conditione
|
||||
|
||||
### Command Inversion
|
||||
|
||||
If your equipment is controlled by a pilot wire with a diode, you may need to check the "Invert the Command" box. This will set the switch to `On` when you need to turn off the equipment and to `Off` when you need to turn it on. The cycle times will be inverted with this option.
|
||||
If your equipment is controlled by a pilot wire with a diode, you may need to check the "Invert the Command" box. This will set the switch to `On` when you need to turn off the equipment and to `Off` when you need to turn it on. The cycle times will be inverted with this option.
|
||||
|
||||
### Command Customization
|
||||
|
||||
This configuration section allows you to customize the on and off commands sent to the underlying device.
|
||||
These commands are mandatory if one of the underlying devices is not a `switch` (for `switch` entities, standard on/off commands are used).
|
||||
|
||||
To customize the commands, click on `Add` at the bottom of the page for both the on and off commands:
|
||||
|
||||

|
||||
|
||||
Then, specify the on and off commands using the format `command[/attribute[:value]]`.
|
||||
The available commands depend on the type of underlying device:
|
||||
|
||||
| Underlying Device Type | Possible On Commands | Possible Off Commands | Applies To |
|
||||
| --------------------------- | ------------------------------------- | ---------------------------------------------- | ----------------------------- |
|
||||
| `switch` or `input_boolean` | `turn_on` | `turn_off` | All switches |
|
||||
| `select` or `input_select` | `select_option/option:comfort` | `select_option/option:frost_protection` | Nodon SIN-4-FP-21 and similar |
|
||||
| `climate` (hvac_mode) | `set_hvac_mode/hvac_mode:heat` | `set_hvac_mode/hvac_mode:off` | eCosy (via Tuya Local) |
|
||||
| `climate` (preset) | `set_preset_mode/preset_mode:comfort` | `set_preset_mode/preset_mode:frost_protection` | Heatzy |
|
||||
|
||||
Of course, these examples can be adapted to your specific case.
|
||||
|
||||
Example for a Nodon SIN-4-FP-21:
|
||||

|
||||
|
||||
Click "Validate" to confirm the modifications.
|
||||
|
||||
If the following error occurs:
|
||||
|
||||
> The command customization configuration is incorrect. It is required for non-switch underlying devices, and the format must be 'service_name[/attribute:value]'. More details in the README.
|
||||
|
||||
This means that one of the entered commands is invalid. The following rules must be followed:
|
||||
1. Each command must follow the format `command[/attribute[:value]]` (e.g., `select_option/option:comfort` or `turn_on`) without spaces or special characters except `_`.
|
||||
2. There must be as many commands as there are declared underlying devices, except when all underlying devices are `switch` entities, in which case command customization is not required.
|
||||
3. If multiple underlying devices are configured, the commands must be in the same order. The number of on commands must equal the number of off commands and the number of underlying devices (in the correct order). It is possible to mix different types of underlying devices. As soon as one underlying device is not a `switch`, all commands for all underlying devices, including `switch` entities, must be configured.
|
||||
|
||||
100
documentation/en/quick-start.md
Normal file
100
documentation/en/quick-start.md
Normal file
@@ -0,0 +1,100 @@
|
||||
# Quick Start
|
||||
|
||||
This page outlines the steps to quickly set up a basic yet operational _VTherm_. It is structured by equipment type.
|
||||
|
||||
- [Quick Start](#quick-start)
|
||||
- [Nodon SIN-4-FP-21 or similar (pilot wire)](#nodon-sin-4-fp-21-or-similar-pilot-wire)
|
||||
- [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-)
|
||||
- [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)
|
||||
- [Call for Contributions](#call-for-contributions)
|
||||
|
||||
## Nodon SIN-4-FP-21 or similar (pilot wire)
|
||||
|
||||
This module allows controlling a radiator via a pilot wire. It appears in _HA_ as a `select` entity that lets you choose the heating preset to apply.
|
||||
|
||||
_VTherm_ will regulate the temperature by periodically changing the preset via customized commands until the setpoint is reached.
|
||||
|
||||
For this to work, the preset used for heating control must be higher than the maximum temperature you will need (24°C is a good value).
|
||||
|
||||
To integrate it into _VTherm_, you must:
|
||||
1. Create a _VTherm_ of type `over_switch`. See [creating a _VTherm_](creation.md),
|
||||
2. Assign it the main attributes (name, room temperature sensor, and outdoor temperature sensor at a minimum). See [main attributes](base-attributes.md),
|
||||
3. Assign one or more underlying devices to control. The underlying device here is the `select` entity that controls the Nodon. See [underlying devices](over-switch.md),
|
||||
4. Provide custom on/off commands (mandatory for the Nodon). See [command customization](over-switch.md#command-customization). The custom commands follow the format `select_option/option:<preset>` as indicated in the link.
|
||||
|
||||
After completing these four steps, you will have a fully functional _VTherm_ that controls your Nodon or similar device.
|
||||
|
||||
## Heatzy, eCosy, or similar (`climate` entity)
|
||||
|
||||
This module allows controlling a radiator that appears in _HA_ as a `climate` entity, enabling you to choose the heating preset or mode (Heat / Cool / Off).
|
||||
|
||||
_VTherm_ will regulate the temperature by turning the device on/off via customized commands at regular intervals until the setpoint is reached.
|
||||
|
||||
To integrate it into _VTherm_, you must:
|
||||
1. Create a _VTherm_ of type `over_switch`. See [creating a _VTherm_](creation.md),
|
||||
2. Assign it the main attributes (name, room temperature sensor, and outdoor temperature sensor at a minimum). See [main attributes](base-attributes.md),
|
||||
3. Assign one or more underlying devices to control. The underlying device here is the `climate` entity that controls the Heatzy or eCosy. See [underlying devices](over-switch.md),
|
||||
4. Provide custom on/off commands (mandatory). See [command customization](over-switch.md#command-customization). The custom commands follow the format `set_hvac_mode/hvac_mode:<mode>` or `set_preset_mode/preset_mode:<preset>` as indicated in the link.
|
||||
|
||||
After completing these four steps, you will have a fully functional _VTherm_ that controls your Heatzy, eCosy, or similar device.
|
||||
|
||||
## Simple switch such as Aqara T1, Nous B2Z, Sonoff ZBMini, Sonoff POW, ...
|
||||
|
||||
This module allows controlling a radiator via a simple switch. It appears in _HA_ as a `switch` entity that directly turns the radiator on or off.
|
||||
|
||||
_VTherm_ will regulate the temperature by periodically turning the `switch` on and off until the setpoint is reached.
|
||||
|
||||
To integrate it into _VTherm_, you must:
|
||||
1. Create a _VTherm_ of type `over_switch`. See [creating a _VTherm_](creation.md),
|
||||
2. Assign it the main attributes (name, room temperature sensor, and outdoor temperature sensor at a minimum). See [main attributes](base-attributes.md),
|
||||
3. Assign one or more underlying devices to control. The underlying device here is the `switch` entity that controls the switch. See [underlying devices](over-switch.md).
|
||||
|
||||
After completing these three steps, you will have a fully functional _VTherm_ that controls your `switch` or similar device.
|
||||
|
||||
## Sonoff TRVZB or similar (TRV with valve control)
|
||||
|
||||
This type of _TRV_ device controls the opening of a valve that allows more or less hot water from a boiler or heat pump to flow. It appears in _HA_ as a `climate` entity along with `number` entities that control the valve. These `number` entities may be hidden and need to be explicitly added in some cases.
|
||||
|
||||
_VTherm_ will adjust the valve opening degree until the setpoint temperature is reached.
|
||||
|
||||
To integrate it into _VTherm_, you must:
|
||||
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 a minimum). See [main attributes](base-attributes.md),
|
||||
3. Assign one or more underlying devices to control. The underlying device here is the `climate` entity that controls the TRV. See [underlying devices](over-climate.md),
|
||||
4. Specify the regulation type as `Direct valve control` only. Leave the option `Compensate for underlying temperature` unchecked. See [auto-regulation](over-climate.md#auto-regulation),
|
||||
5. Provide the `number` entities named `opening_degree` and `calibration_offset`. Do not configure the `closing_degree` entity. See [underlying devices](over-switch.md).
|
||||
|
||||
For this to work, the `closing degree` must be set to the maximum (100%). Do not immediately enable the `Follow underlying temperature change` option until you have verified that this basic configuration is working properly.
|
||||
|
||||
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
|
||||
|
||||
Once created, you need to configure the preset temperatures. See [presets](feature-presets.md) for a minimal configuration.
|
||||
You can also (optional but recommended) install the dedicated UI card for your dashboards. (See [VTHerm UI Card](https://github.com/jmcollin78/versatile-thermostat-ui-card))
|
||||
|
||||
Once this minimal setup is functional—and only once it works correctly—you can add additional features such as presence detection to avoid heating when no one is present. Add them one by one, verifying that _VTherm_ reacts correctly at each step before proceeding to the next.
|
||||
|
||||
You can then set up centralized configurations to share settings across all _VTherm_ instances, enable central mode for unified control of all _VTherms_ ([centralized configuration](feature-central-mode.md)), or integrate a central boiler control ([central boiler](feature-central-boiler.md)). This is not an exhaustive list—please refer to the table of contents for a complete list of _VTherm_ features.
|
||||
|
||||
# Call for Contributions
|
||||
|
||||
This page is open for contributions. Feel free to suggest additional equipment and minimal configuration setups.
|
||||
@@ -61,6 +61,7 @@
|
||||
| ``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 | - |
|
||||
| ``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_min_on_percent`` | Minimum power percentage to enter security mode | X | - | X | X |
|
||||
| ``auto_regulation_mode`` | Auto-regulation mode | - | X | - | - |
|
||||
@@ -259,6 +260,7 @@ The custom attributes are as follows:
|
||||
| ``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 |
|
||||
| ``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 |
|
||||
| ``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 |
|
||||
|
||||
@@ -31,8 +31,8 @@ This allows you to configure the valve control entities:
|
||||
You need to provide:
|
||||
1. As many valve opening control entities as there are underlying devices, and in the same order. These parameters are mandatory.
|
||||
2. As many temperature calibration entities as there are underlying devices, and in the same order. These parameters are optional; they must either all be provided or none.
|
||||
3. As many valve closure control entities as there are underlying devices, and in the same order. These parameters are optional; they must either all be provided or none.
|
||||
4. A list of minimum opening values for the valve when it needs to be opened. This field is a list of integers. If the valve needs to be opened, it will be opened at a minimum of this opening value. This allows enough water to pass through when it needs to be opened.
|
||||
3. As many valve closure control entities as there are underlying devices, and in the same order. These parameters are optional; they must either all be provided or none. For Sonoff TRVZB, you should not configure this entity. See the note below.
|
||||
4. A list of minimum opening values for the valve when it needs to be opened. This field is a list of integers. If the valve needs to be opened, it will be opened at a minimum of this opening value, else it will be set to 0 (to ensure the valve is closed). This allows enough water to pass through when it needs to be opened.
|
||||
|
||||
The opening rate calculation algorithm is based on the _TPI_ algorithm described [here](algorithms.md). This is the same algorithm used for _VTherms_ `over_switch` and `over_valve`.
|
||||
|
||||
@@ -152,4 +152,4 @@ To apply the changes, you must either **restart Home Assistant completely** or j
|
||||
|
||||
## Summary of the Auto-Regulation Algorithm
|
||||
|
||||
A summary of the auto-regulation algorithm is described [here](algorithms.md#the-auto-regulation-algorithm-without-valve-control)
|
||||
A summary of the auto-regulation algorithm is described [here](algorithms.md#the-auto-regulation-algorithm-without-valve-control)
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
## Using a Heatzy
|
||||
|
||||
The Heatzy is now natively supported by _VTherm_. See [Quick Start](quick-start.md#heatzy-or-ecosy-or-similar-climate-entity).
|
||||
|
||||
This configuration is kept for reference only.
|
||||
|
||||
Using a Heatzy or Nodon is possible provided you use a virtual switch with this model:
|
||||
|
||||
```yaml
|
||||
@@ -53,6 +57,12 @@ Using a Heatzy or Nodon is possible provided you use a virtual switch with this
|
||||
Thanks to @gael for this example.
|
||||
|
||||
## Using a radiator with a pilot wire (Nodon SIN-4-FP-21)
|
||||
|
||||
The Nodon is now natively supported by _VTherm_. See [Quick Start](quick-start.md#nodon-sin-4-fp-21-or-similar-pilot-wire).
|
||||
|
||||
This configuration is kept for reference only.
|
||||
|
||||
|
||||
As with the Heatzy above, you can use a virtual switch that will change the preset of your radiator based on the VTherm’s on/off state.
|
||||
Example:
|
||||
|
||||
|
||||
BIN
documentation/fr/images/config-vswitch1.png
Normal file
BIN
documentation/fr/images/config-vswitch1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
documentation/fr/images/config-vswitch2.png
Normal file
BIN
documentation/fr/images/config-vswitch2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
@@ -63,6 +63,8 @@ Une fois l'écart de température redevenu faible, la ventilation se mettra dans
|
||||
|
||||
### Compenser la température interne du sous-jacent
|
||||
|
||||
Attention : cette option ne doit pas être utilisée avec une régulation par contrôle direct de la vanne si une entité de calibrage a été fournie.
|
||||
|
||||
Quelque fois, il arrive que le thermomètre interne du sous-jacent (TRV, climatisation, ...) soit tellement faux que l' auto-régulation ne suffise pas à réguler.
|
||||
Cela arrive lorsque le thermomètre interne est trop près de la source de chaleur. La température interne monte alors beaucoup plus vite que la température de la pièce, ce qui génère des défauts dans la régulation.
|
||||
Exemple :
|
||||
@@ -103,4 +105,4 @@ Lorsque cette entité est 'On', tous les changements de température ou d'état
|
||||
Attention, si vous utilisez cette fonction, votre équipement est maintenant contrôlé par 2 moyens : _VTherm_ et par vous même directement. Les ordres peuvent être contradictoires et cela peut induire une incompréhension sur l'état de l'équipement. _VTherm_ est équipé d'un mécanisme de temporisation qui évite les boucles : l'utilisateur donne une consigne qui est captée par _VTherm_ qui change la consigne, ... Cette temporisation peut faire que le changement fait directement sur l'équipement est ignoré si ces changements sont trop rapprochés dans le temps.
|
||||
|
||||
Certains équipements (Daikin par exemple), changent d'état tout seul. Si la case est cochée, cela peut éteindre le _VTherm_ alors que ce n'est pas ce que vous souhaitiez.
|
||||
C'est pour ça qu'il est préférable de ne pas l'utiliser. Cela génère beaucoup d'incompréhensions et de nombreuses demandes de support.
|
||||
C'est pour ça qu'il est préférable de ne pas l'utiliser. Cela génère beaucoup d'incompréhensions et de nombreuses demandes de support.
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
- [Le keep-alive](#le-keep-alive)
|
||||
- [Le mode AC](#le-mode-ac)
|
||||
- [L'inversion de la commande](#linversion-de-la-commande)
|
||||
- [La personnalisation des commandes](#la-personnalisation-des-commandes)
|
||||
|
||||
## Pré-requis
|
||||
|
||||
@@ -17,8 +18,8 @@ L'installation doit ressembler à ça :
|
||||
1. L'utilisateur ou une automatisation ou le Sheduler programme une consigne (setpoint) par le biais d'un pre-réglage ou directement d'une température,
|
||||
2. régulièrement le thermomètre intérieur (2) ou extérieur (2b) envoie la température mesurée. Le thermomètre interieur doit être placé à une place pertinente pour le ressenti de l'utilisateur : idéalement au milieu du lieu de vie. Evitez de le mettre trop près d'une fenêtre ou trop proche du radiateur,
|
||||
3. avec les valeurs de consigne, les différentes températures et des paramètres de l'algorithme TPI (cf. [TPI](algorithms.md#lalgorithme-tpi)), VTherm va calculer un pourcentage de temps d'allumage,
|
||||
4. et va régulièrement commander l'allumage et l'extinction du ou des entités `switch` sous-jacentes,
|
||||
5. ces entités switchs sous-jacentes vont alors commander le switch physique
|
||||
4. et va régulièrement commander l'allumage et l'extinction du ou des entités `switch` (ou `select` ou `climate`) sous-jacentes,
|
||||
5. ces entités sous-jacentes vont alors commander l'équipement physique
|
||||
6. la commande du switch physique allumera ou éteindra le radiateur.
|
||||
|
||||
> Le pourcentage d'allumage est recalculé à chaque cycle et c'est ce qui permet de réguler la température de la pièce.
|
||||
@@ -31,7 +32,9 @@ Ensuite cliquez sur l'option de menu "Sous-jacents" et vous allez avoir cette pa
|
||||

|
||||
|
||||
### les sous-jacents
|
||||
Dans la "liste des équipements à contrôler" vous mettez les switchs qui vont être controllés par le VTherm. Seuls les entités de type `switch` ou `input_boolean` sont acceptées.
|
||||
Dans la "liste des équipements à contrôler" vous mettez les switchs qui vont être controllés par le VTherm. Seuls les entités de type `switch` ou `input_boolean` ou `select` ou `input_select` ou `climate` sont acceptées.
|
||||
|
||||
Si un des sous-jacents n'est pas un `switch` alors la personnalisation des commandes est obligatoires. Par défaut pour les `switch` les commandes sont les commandes classique d'allumage / extinction du switch (`turn_on`, `turn_off`)
|
||||
|
||||
L'algorithme à utiliser est aujourd'hui limité à TPI est disponible. Voir [algorithme](#algorithme).
|
||||
Si plusieurs entités de type sont configurées, la thermostat décale les activations afin de minimiser le nombre de switch actif à un instant t. Ca permet une meilleure répartition de la puissance puisque chaque radiateur va s'allumer à son tour.
|
||||
@@ -54,3 +57,37 @@ Il est possible de choisir un thermostat over switch qui commande une climatisat
|
||||
|
||||
Si votre équipement est commandé par un fil pilote avec un diode, vous aurez certainement besoin de cocher la case "Inverser la case". Elle permet de mettre le switch à `On` lorsqu'on doit étiendre l'équipement et à `Off` lorsqu'on doit l'allumer. Les temps de cycle sont donc inversés avec cette option.
|
||||
|
||||
### La personnalisation des commandes
|
||||
|
||||
Cette section de configuration permet de personnaliser les commandes d'allumage et d'extinction envoyée à l'équipement sous-jacent,
|
||||
Ces commandes sont obligatoires si un des sous-jacents n'est pas un `switch` (pour les `switchs` les commandes d'allumage/extinction classiques sont utilisées).
|
||||
|
||||
Pour personnaliser les commande, cliquez sur `Ajouter` en bas de page sur les commandes d'allumage et sur les commandes d'extinction :
|
||||
|
||||

|
||||
|
||||
et donner la commande d'allumage et d'exinction avec le format `commande[/attribut[:valeur]]`.
|
||||
Les commandes possibles dépendent du type de sous-jacents :
|
||||
|
||||
| type de sous-jacent | commandes d'allumage possibles | commandes d'extinction possibles | S'applique à |
|
||||
| --------------------------- | ------------------------------------- | ---------------------------------------------- | ------------------------------ |
|
||||
| `switch` ou `input_boolean` | `turn_on` | `turn_off` | tous les switchs |
|
||||
| `select` ou `input_select` | `select_option/option:comfort` | `select_option/option:frost_protection` | Nodon SIN-4-FP-21 et assimilés |
|
||||
| `climate` (hvac_mode) | `set_hvac_mode/hvac_mode:heat` | `set_hvac_mode/hvac_mode:off` | eCosy (via Tuya Local) |
|
||||
| `climate` (preset) | `set_preset_mode/preset_mode:comfort` | `set_preset_mode/preset_mode:frost_protection` | Heatzy |
|
||||
|
||||
Evidemment, tous ces exemples peuvent être adaptés à votre cas.
|
||||
|
||||
Exemple pour un Nodon SIN-4-FP-21 :
|
||||

|
||||
|
||||
Cliquez sur valider pour accepter les modifications.
|
||||
|
||||
Si l'erreur suivante se produit :
|
||||
|
||||
> La configuration de la personnalisation des commandes est incorrecte. Elle est obligatoire pour les sous-jacents non switch et le format doit être 'service_name[/attribut:valeur]'. Plus d'informations dans le README.
|
||||
|
||||
Cela signifie que une des commandes saisies est invalide. Les règles à respecter sont les suivantes :
|
||||
1. chaque commande doit avoir le format `commande[/attribut[:valeur]]` (ex: `select_option/option:comfort` ou `turn_on`) sans blanc et sans caractères spéciaux sauf '_',
|
||||
2. il doit y avoir autant de commandes qu'il y a de sous-jacents déclarés sauf si tous les sous-jacents sont des `switchs` auquel cas il n'est pas nécessaire de paramétrer les commandes,
|
||||
3. si plusieurs sous-jacents sont configurés, les commandes doivent être dans le même ordre. Le nombre de commandes d'allumage doit être égal au nombre de commandes d'extinction et de sous-jacents (dans l'ordre donc). Il est possible de mettre des sous-jacents de type différent. À partir du moment où un sous-jacent n'est pas un `switch`, il faut paramétrer toutes les commandes de tous les sous-jacents y compris des éventuels switchs.
|
||||
|
||||
100
documentation/fr/quick-start.md
Normal file
100
documentation/fr/quick-start.md
Normal file
@@ -0,0 +1,100 @@
|
||||
# Démarrage rapide
|
||||
|
||||
Cette page présente les étapes à suivre pour avoir un _VTherm_ basique mais opérationnel rapidement. Elle est présentée par type d'équipements.
|
||||
|
||||
- [Démarrage rapide](#démarrage-rapide)
|
||||
- [Nodon SIN-4-FP-21 ou assimilé (fil pilote)](#nodon-sin-4-fp-21-ou-assimilé-fil-pilote)
|
||||
- [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-)
|
||||
- [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)
|
||||
- [Appel à contribution](#appel-à-contribution)
|
||||
|
||||
|
||||
## Nodon SIN-4-FP-21 ou assimilé (fil pilote)
|
||||
|
||||
Ce module permet de commander un radiateur avec un fil pilote. Il est visible sous _HA_ sous la forme d'une entité `select` qui permet de choisir le preset de chauffage à appliquer.
|
||||
|
||||
_VTherm_ va réguler la température en changeant de preset via les commandes personnalisées régulièrement jusqu'à ce que la consigne soit atteinte.
|
||||
|
||||
Pour que cela fonctionne, il faut le preset utiliser pour la commande de chauffage soit supérieur à la température maximale que vous aurez besoin (24° est une bonne valeur).
|
||||
|
||||
Pour l'intégrer dans _VTherm_ vous devez :
|
||||
1. Créer un _VTherm_ de type `over_switch`. 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é `select` qui contrôle le Nodon. Cf. [sous-jacent](over-switch.md),
|
||||
4. Lui donner des commandes d'allumage et extinction personnalisées (obligatoire pour le Nodon). Cf. [sous-jacent](over-switch.md#la-personnalisation-des-commandes). Les commandes personnalisées sont du type `select_option/option:<preset>` comme indiqué dans le lien.
|
||||
|
||||
A l'issue de ces 4 étapes vous avez un _VTherm_ opérationnel ultra simple qui contrôle votre Nodon ou assimilé.
|
||||
|
||||
## Heatzy ou eCosy ou assimilé (entité `climate`)
|
||||
|
||||
Ce module permet de commander un radiateur qui est visible 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 allumant / éteignant via les commandes personnalisées régulièrement l'équipement jusqu'à ce que la consigne soit atteinte.
|
||||
|
||||
Pour l'intégrer dans _VTherm_ vous devez :
|
||||
1. Créer un _VTherm_ de type `over_switch`. 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 le Heatzy ou le eCosy. Cf. [sous-jacent](over-switch.md),
|
||||
4. Lui donner des commandes d'allumage et extinction personnalisées (obligatoire). Cf. [sous-jacent](over-switch.md#la-personnalisation-des-commandes). Les commandes personnalisées sont du type `set_hvac_mode/hvac_mode:<mode>` ou `set_preset_mode/preset_mode:<preset>` comme indiqué dans le lien.
|
||||
|
||||
A l'issue de ces 4 étapes vous avez un _VTherm_ opérationnel ultra simple qui commande votre équipement Heatzy ou eCosy ou assimilé.
|
||||
|
||||
## Simple switch comme Aqara T1, Nous B2Z, Sonoff ZBMini, Sonoff POW, ...
|
||||
|
||||
Ce module permet de commander un radiateur contrôlé par un simple switch. Il est visible sous _HA_ sous la forme d'une entité `switch` qui permet d'allumer ou éteindre directement le radiateur.
|
||||
|
||||
_VTherm_ va réguler la température en allumant / éteignant régulièrement le `switch` jusqu'à ce que la consigne soit atteinte.
|
||||
|
||||
Pour l'intégrer dans _VTherm_ vous devez :
|
||||
1. Créer un _VTherm_ de type `over_switch`. 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é `switch` qui contrôle le switch. Cf. [sous-jacent](over-switch.md)
|
||||
|
||||
A l'issue de ces 3 étapes vous avez un _VTherm_ opérationnel ultra simple qui contrôle votre `switch` ou assimilé.
|
||||
|
||||
## Sonoff TRVZB ou assimilé (TRV avec contrôle de la vanne)
|
||||
|
||||
Cet équipement de type _TRV_ contrôle l'ouverture d'une vanne qui laisse plus ou moins passer de l'eau chaude produit par une chaudière ou une PAC. Il est visible sous _HA_ sous la forme d'une entité de type `climate` et d'entités de type `number` qui vont permettre le contrôle de la vanne. Ces entités `number` peuvent être cachées et doivent être explicitement ajoutées dans certains cas.
|
||||
|
||||
Le _VTherm_ va moduler le taux d'ouverture de la vanne jusqu'à obtention de la température de consigne.
|
||||
|
||||
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 le TRV. Cf. [sous-jacent](over-climate.md),
|
||||
4. Spécifiez la régulation de type `Par contrôle direct de la vanne` uniquement. Laissez décochée l'option `Compenser la température interne du sous-jacent`. Cf. [sous-jacent](over-climate.md#lauto-régulation),
|
||||
5. Lui donner les entités de type `number` nommées `opening_degree` et `calibration offset`. Ne pas renseigner l'entité `closing degree` Cf. [sous-jacent](over-switch.md),
|
||||
|
||||
Pour que cela fonctionne, il faut que le `closing degree` soit réglé au maximum (100%). Ne cocher pas tout de suite l'entité `Follow underlying temperature change` avant d'avoir bien vérifier que cette configuration de base fonctionne.
|
||||
|
||||
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
|
||||
|
||||
Uen fois créé, vous devez paramétrer les températures des presets. Cf. [presets](feature-presets.md) pour avoir une configuration minimale.
|
||||
Vous pouvez aussi (facultatif mais conseillé) installer la carte dédiée pour vos dashboard. (Cf. [VTHerm UI Card](https://github.com/jmcollin78/versatile-thermostat-ui-card))
|
||||
|
||||
Une fois cette configuration minimale opérationnelle - et seulement lorsque cette configuration minimale fonctionne -, vous pourrez ajouter des fonctions supplémentaires comme la détection de présence pour éviter de chauffer lorsqu'il n'y a personne. Ajoutez les une par une, vérifiez à chaque nouvelle fonction que _VTherm_ réagit correctement avant de passer à la suivante.
|
||||
|
||||
Ensuite vous pourrez ajouter une configuration centrale pour mettre en commum des réglages entre tous les _VTherm_, paraméter le mode central permettant de contrôler tous les _VTherms_ d'un coup ([la configuration centralisée](feature-central-mode.md)), ajouter un éventuel contrôle d'une chaudière centrale ([la chaudière centrale](feature-central-boiler.md)). Cette liste est non exhaustive, merci de consulter le sommaire pour avoir la liste de toutes les fonctions de _VTherm_.
|
||||
|
||||
# Appel à contribution
|
||||
|
||||
Cette page ne demande qu'à se compléter. N'hésitez pas à proposer vos équipements et la configuration minimale.
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
# L'auto-régulation
|
||||
|
||||
- [L'auto-régulation](#lauto-régulation)
|
||||
- [Configuration](#configuration)
|
||||
- [auto-régulation par contrôle direct de la vanne](#auto-régulation-par-contrôle-direct-de-la-vanne)
|
||||
- [autres auto-régulation](#autres-auto-régulation)
|
||||
- [L'auto-régulation en mode Expert](#lauto-régulation-en-mode-expert)
|
||||
- [Synthèse de l'algorithme d'auto-régulation](#synthèse-de-lalgorithme-dauto-régulation)
|
||||
- [Synthèse de l'algorithme d'auto-régulation](#synthèse-de-lalgorithme-dauto-régulation)
|
||||
|
||||
Vous avez la possibilité d'activer la fonction d'auto-régulation pour les _VTherm_ de type `over_climate` uniquement.
|
||||
|
||||
@@ -32,8 +35,8 @@ Elle permet de configurer les entités de contrôle de la vanne :
|
||||
Vous devez donner :
|
||||
1. autant d'entités de contrôle d'ouverture de la vanne qu'il y a de sous-jacents et dans le même odre. Ces paramètres sont obligatoires,
|
||||
2. autant d'entités de calibrage du décalage de température qu'il y a de sous-jacents et dans le même ordre. Ces paramètres sont facultatifs ; ils doivent être tous founis ou aucun,
|
||||
3. autant d'entités de de contrôile du taux de fermture qu'il y a de sous-jacents et dans le même ordre. Ces paramètres sont facultatifs ; ils doivent être tous founis ou aucun,
|
||||
4. une liste de valeurs minimales d'ouverture de la vanne lorsqu'elle doit être ouverte. Ce champ est une liste d'entier. Si la vanne doit être ouverte, elle le sera au minimum avec cette valeur d'ouverture. Cela permet de laisser passer suffisamment d'eau lorsqu'elle doit être ouverte.
|
||||
3. autant d'entités de de contrôile du taux de fermture qu'il y a de sous-jacents et dans le même ordre. Ces paramètres sont facultatifs ; ils doivent être tous founis ou aucun. Pour les Sonoff TRVZB, ils ne doivent pas être fournis,
|
||||
4. une liste de valeurs minimales d'ouverture de la vanne lorsqu'elle doit être ouverte. Ce champ est une liste d'entier. Si la vanne doit être ouverte, elle le sera au minimum avec cette valeur d'ouverture, sinon elle sera totalement close (0). Cela permet de laisser passer suffisamment d'eau lorsqu'elle doit être ouverte mais garde la fermeeture complète si il n'y a pas besoin de chauffer.
|
||||
|
||||
L'algorithme de calcul du taux d'ouverture est basé sur le _TPI_ qui est décrit [ici](algorithms.md). C'est le même algorithme qui est utilisé pour les _VTherm_ `over_switch` et `over_valve`.
|
||||
|
||||
@@ -152,4 +155,4 @@ Pour que les modifications soient prises en compte, il faut soit **relancer tota
|
||||
|
||||
## Synthèse de l'algorithme d'auto-régulation
|
||||
|
||||
Une synthèse de l'algorithme d'auto-régulation est décrite [ici](algorithms.md#lalgorithme-dauto-régulation-sans-contrôle-de-la-vanne)
|
||||
Une synthèse de l'algorithme d'auto-régulation est décrite [ici](algorithms.md#lalgorithme-dauto-régulation-sans-contrôle-de-la-vanne)
|
||||
|
||||
@@ -17,10 +17,15 @@
|
||||
- [Utilisation d'un groupe de personnes comme capteur de présence](#utilisation-dun-groupe-de-personnes-comme-capteur-de-présence)
|
||||
- [Activer les logs du Versatile Thermostat](#activer-les-logs-du-versatile-thermostat)
|
||||
- [VTherm ne suit pas les changements de consigne faits directement depuis le sous-jacents (`over_climate`)](#vtherm-ne-suit-pas-les-changements-de-consigne-faits-directement-depuis-le-sous-jacents-over_climate)
|
||||
- [VTherm passe tout seul en mode 'clim' ou en mode 'chauffage'](#vtherm-passe-tout-seul-en-mode-clim-ou-en-mode-chauffage)
|
||||
|
||||
|
||||
## Utilisation d'un Heatzy
|
||||
|
||||
Le Heatzy est maintenant pris en charge nativement par _VTherm_. Cf. [Démarrage rapide](quick-start.md#heatzy-ou-ecosy-ou-assimilé-entité-climate).
|
||||
|
||||
Cette configuration est gardée pour mémoire uniquement.
|
||||
|
||||
L'utilisation d'un Heatzy ou Nodon est possible à la condition d'utiliser un switch virtuel sur ce modèle :
|
||||
|
||||
```yaml
|
||||
@@ -52,6 +57,11 @@ L'utilisation d'un Heatzy ou Nodon est possible à la condition d'utiliser un sw
|
||||
Merci à @gael pour cet exemple.
|
||||
|
||||
## Utilisation d'un radiateur avec un fil pilote (Nodon SIN-4-FP-21)
|
||||
|
||||
Le Nodon est maintenant pris en charge nativement par _VTherm_. Cf. [Démarrage rapide](quick-start.md#nodon-sin-4-fp-21-ou-assimilé-fil-pilote).
|
||||
|
||||
Cette configuration est gardée pour mémoire uniquement.
|
||||
|
||||
Comme pour le Heatzy ci-dessus vous pouvez utiliser un switch virtuel qui va changer le preset de votre radiateur en fonction de l'état d'allumage du VTherm.
|
||||
Exemple :
|
||||
|
||||
|
||||
BIN
images/new-icon.png
Normal file
BIN
images/new-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
@@ -1 +1 @@
|
||||
homeassistant==2025.1.2
|
||||
homeassistant==2025.1.4
|
||||
|
||||
@@ -181,6 +181,7 @@ FULL_CENTRAL_CONFIG = {
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.mock_presence_sensor",
|
||||
CONF_PRESET_POWER: 14,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 11,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 61,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
|
||||
@@ -222,6 +223,7 @@ FULL_CENTRAL_CONFIG_WITH_BOILER = {
|
||||
CONF_MAX_POWER_SENSOR: "sensor.mock_max_power_sensor",
|
||||
CONF_PRESET_POWER: 14,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 11,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 61,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
|
||||
|
||||
@@ -185,6 +185,7 @@ MOCK_PRESENCE_AC_CONFIG = {
|
||||
|
||||
MOCK_ADVANCED_CONFIG = {
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.4,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
|
||||
|
||||
@@ -53,6 +53,7 @@ async def test_over_climate_auto_fan_mode_turbo(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -119,6 +120,7 @@ async def test_over_climate_auto_fan_mode_not_turbo(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -189,6 +191,7 @@ async def test_over_climate_auto_fan_mode_turbo_activation(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
|
||||
@@ -335,6 +335,7 @@ async def test_auto_start_stop_none_vtherm(
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -426,6 +427,7 @@ async def test_auto_start_stop_medium_heat_vtherm(
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -691,6 +693,7 @@ async def test_auto_start_stop_fast_ac_vtherm(
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_UNDERLYING_LIST: ["climate.mock_climate"],
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -932,6 +935,7 @@ async def test_auto_start_stop_medium_heat_vtherm_preset_change(
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -1145,6 +1149,7 @@ async def test_auto_start_stop_medium_heat_vtherm_preset_change_enable_false(
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -1284,6 +1289,7 @@ async def test_auto_start_stop_fast_heat_window(
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -1462,6 +1468,7 @@ async def test_auto_start_stop_fast_heat_window_mixed(
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -1644,6 +1651,7 @@ async def test_auto_start_stop_disable_vtherm_off(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
|
||||
@@ -57,6 +57,7 @@ async def test_security_binary_sensors(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 30,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
},
|
||||
@@ -138,6 +139,7 @@ async def test_overpowering_binary_sensors(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 100,
|
||||
@@ -240,6 +242,7 @@ async def test_window_binary_sensors(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
|
||||
@@ -328,6 +331,7 @@ async def test_motion_binary_sensors(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
|
||||
@@ -421,6 +425,7 @@ async def test_presence_binary_sensors(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.mock_presence_sensor",
|
||||
@@ -504,6 +509,7 @@ async def test_binary_sensors_over_climate_minimal(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
},
|
||||
@@ -539,3 +545,4 @@ async def test_binary_sensors_over_climate_minimal(
|
||||
hass, "binary_sensor.theoverclimatemockname_presence_state", "binary_sensor"
|
||||
)
|
||||
assert presence_binary_sensor is None
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ async def test_bug_63(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.0, # !! here
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.0, # !! here
|
||||
@@ -115,6 +116,7 @@ async def test_bug_64(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, # !! here
|
||||
@@ -304,6 +306,7 @@ async def test_bug_407(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 100,
|
||||
@@ -545,6 +548,7 @@ async def test_bug_465(hass: HomeAssistant, skip_hass_states_is_state):
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
|
||||
@@ -111,6 +111,7 @@ async def test_update_central_boiler_state_simple(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -298,6 +299,7 @@ async def test_update_central_boiler_state_multiple(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -626,6 +628,7 @@ async def test_update_central_boiler_state_simple_valve(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -800,6 +803,7 @@ async def test_update_central_boiler_state_simple_climate(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_UNDERLYING_LIST: [climate1.entity_id],
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -990,6 +994,7 @@ async def test_update_central_boiler_state_simple_climate_valve_regulation(
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_HIGH,
|
||||
CONF_AUTO_REGULATION_USE_DEVICE_TEMP: False,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -1255,6 +1260,7 @@ async def test_bug_339(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: climate1.entity_id,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
|
||||
@@ -67,6 +67,7 @@ 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_PRESET_POWER: 14,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 11,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 61,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
|
||||
@@ -135,6 +136,7 @@ async def test_minimal_over_switch_wo_central_config(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -224,6 +226,7 @@ async def test_full_over_switch_wo_central_config(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -349,6 +352,7 @@ async def test_full_over_switch_with_central_config(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -511,6 +515,7 @@ async def test_migration_of_central_config(
|
||||
CONF_TPI_COEF_INT: 0.5,
|
||||
CONF_TPI_COEF_EXT: 0.02,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 11,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 61,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
|
||||
|
||||
@@ -56,6 +56,7 @@ async def test_config_with_central_mode_true(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -103,6 +104,7 @@ async def test_config_with_central_mode_false(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -153,6 +155,7 @@ async def test_config_with_central_mode_none(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -205,6 +208,7 @@ async def test_switch_change_central_mode_true(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -347,6 +351,7 @@ async def test_switch_ac_change_central_mode_true(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -482,6 +487,7 @@ async def test_climate_ac_change_central_mode_false(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -624,6 +630,7 @@ async def test_climate_ac_only_change_central_mode_true(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -778,6 +785,7 @@ async def test_switch_change_central_mode_true_with_window(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
@@ -935,6 +943,7 @@ async def test_switch_change_central_mode_true_with_cool_only_and_window(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
|
||||
@@ -741,6 +741,7 @@ async def test_central_power_manager_start_vtherm_power(hass: HomeAssistant, ski
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 1000,
|
||||
@@ -811,6 +812,7 @@ async def test_central_power_manager_start_vtherm_power(hass: HomeAssistant, ski
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_UNDERLYING_LIST: ["switch.mock_climate"],
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 150,
|
||||
|
||||
@@ -471,6 +471,7 @@ async def test_user_config_flow_over_climate(
|
||||
result["flow_id"],
|
||||
user_input={
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.4,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
|
||||
@@ -495,6 +496,7 @@ async def test_user_config_flow_over_climate(
|
||||
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 | {
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.4,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
|
||||
@@ -1077,6 +1079,7 @@ async def test_user_config_flow_over_climate_auto_start_stop(
|
||||
result["flow_id"],
|
||||
user_input={
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.4,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
|
||||
@@ -1104,6 +1107,7 @@ async def test_user_config_flow_over_climate_auto_start_stop(
|
||||
"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_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.4,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
|
||||
@@ -1274,6 +1278,7 @@ async def test_user_config_flow_over_switch_bug_552_tpi(
|
||||
result["flow_id"],
|
||||
user_input={
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.4,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
|
||||
@@ -1359,6 +1364,7 @@ async def test_user_config_flow_over_switch_bug_552_tpi(
|
||||
CONF_TEMP_MAX: 30,
|
||||
CONF_STEP_TEMPERATURE: 0.5,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.4,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
|
||||
@@ -1658,6 +1664,7 @@ async def test_user_config_flow_over_climate_valve(
|
||||
result["flow_id"],
|
||||
user_input={
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.4,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
|
||||
@@ -1684,6 +1691,7 @@ async def test_user_config_flow_over_climate_valve(
|
||||
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 | {
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.4,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.3,
|
||||
|
||||
@@ -18,6 +18,12 @@ logging.getLogger().setLevel(logging.DEBUG)
|
||||
async def test_inverted_switch(hass: HomeAssistant, skip_hass_states_is_state):
|
||||
"""Test the Window auto management"""
|
||||
|
||||
temps = {
|
||||
"eco": 17,
|
||||
"comfort": 18,
|
||||
"boost": 21,
|
||||
}
|
||||
|
||||
entry = MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
title="TheOverSwitchMockName",
|
||||
@@ -30,18 +36,16 @@ async def test_inverted_switch(hass: HomeAssistant, skip_hass_states_is_state):
|
||||
CONF_CYCLE_MIN: 5,
|
||||
CONF_TEMP_MIN: 15,
|
||||
CONF_TEMP_MAX: 30,
|
||||
"eco_temp": 17,
|
||||
"comfort_temp": 18,
|
||||
"boost_temp": 21,
|
||||
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_UNDERLYING_LIST: ["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: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1,
|
||||
@@ -51,14 +55,12 @@ async def test_inverted_switch(hass: HomeAssistant, skip_hass_states_is_state):
|
||||
},
|
||||
)
|
||||
|
||||
with patch(
|
||||
"homeassistant.core.ServiceRegistry.async_call"
|
||||
) as mock_service_call, patch(
|
||||
"homeassistant.core.StateMachine.is_state", return_value=True # switch is On
|
||||
# 0. Create the entity
|
||||
|
||||
with patch("homeassistant.core.ServiceRegistry.async_call") as mock_service_call, patch(
|
||||
"homeassistant.core.StateMachine.is_state", return_value=False # switch is On so is_state(switch, 'off') is False
|
||||
):
|
||||
entity: ThermostatOverSwitch = await create_thermostat(
|
||||
hass, entry, "climate.theoverswitchmockname"
|
||||
)
|
||||
entity: ThermostatOverSwitch = await create_thermostat(hass, entry, "climate.theoverswitchmockname", temps)
|
||||
assert entity
|
||||
assert entity.is_inversed
|
||||
|
||||
@@ -78,12 +80,10 @@ async def test_inverted_switch(hass: HomeAssistant, skip_hass_states_is_state):
|
||||
assert mock_service_call.call_count == 0
|
||||
|
||||
# 1. Make the temperature down to activate the switch
|
||||
with patch(
|
||||
"custom_components.versatile_thermostat.base_thermostat.BaseThermostat.send_event"
|
||||
), patch(
|
||||
with patch("custom_components.versatile_thermostat.base_thermostat.BaseThermostat.send_event"), patch(
|
||||
"homeassistant.core.ServiceRegistry.async_call"
|
||||
) as mock_service_call, patch(
|
||||
"homeassistant.core.StateMachine.is_state", return_value=True # switch is Off
|
||||
"homeassistant.core.StateMachine.is_state", return_value=True # switch is Off so is_state(switch, 'off') is True
|
||||
):
|
||||
event_timestamp = now - timedelta(minutes=4)
|
||||
await send_temperature_change_event(entity, 19, event_timestamp)
|
||||
|
||||
@@ -54,6 +54,7 @@ async def test_last_seen_feature(hass: HomeAssistant, skip_hass_states_is_state)
|
||||
"tpi_coef_int": 0.3,
|
||||
"tpi_coef_ext": 0.01,
|
||||
"minimal_activation_delay": 30,
|
||||
"minimal_deactivation_delay": 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5, # 5 minutes
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.2,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1,
|
||||
|
||||
@@ -305,6 +305,7 @@ async def test_motion_management_time_not_enough(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 10,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
|
||||
@@ -506,6 +507,7 @@ async def test_motion_management_time_enough_and_presence(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
|
||||
@@ -631,6 +633,7 @@ async def test_motion_management_time_enough_and_not_presence(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
|
||||
@@ -757,6 +760,7 @@ async def test_motion_management_with_stop_during_condition(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
|
||||
@@ -890,6 +894,7 @@ async def test_motion_management_with_stop_during_condition_last_state_on(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_MOTION_SENSOR: "binary_sensor.mock_motion_sensor",
|
||||
|
||||
@@ -45,6 +45,7 @@ async def test_one_switch_cycle(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_HEATER: "switch.mock_switch1",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI,
|
||||
@@ -248,6 +249,7 @@ async def test_multiple_switchs(
|
||||
CONF_HEATER_4: "switch.mock_switch4",
|
||||
CONF_HEATER_KEEP_ALIVE: 0,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI,
|
||||
@@ -383,6 +385,7 @@ async def test_multiple_climates(
|
||||
CONF_CLIMATE_3: "switch.mock_climate3",
|
||||
CONF_CLIMATE_4: "switch.mock_climate4",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
},
|
||||
@@ -484,6 +487,7 @@ async def test_multiple_climates_underlying_changes(
|
||||
CONF_CLIMATE_3: "switch.mock_climate3",
|
||||
CONF_CLIMATE_4: "switch.mock_climate4",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
},
|
||||
@@ -629,6 +633,7 @@ async def test_multiple_climates_underlying_changes_not_aligned(
|
||||
CONF_CLIMATE_3: "switch.mock_climate3",
|
||||
CONF_CLIMATE_4: "switch.mock_climate4",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
},
|
||||
@@ -734,6 +739,7 @@ async def test_multiple_switch_power_management(
|
||||
],
|
||||
CONF_HEATER_KEEP_ALIVE: 0,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI,
|
||||
|
||||
@@ -62,6 +62,7 @@ async def test_bug_56(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
},
|
||||
@@ -653,6 +654,7 @@ async def test_bug_524(hass: HomeAssistant, skip_hass_states_is_state):
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -923,6 +925,7 @@ async def test_manual_hvac_off_should_take_the_lead_over_window(
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -1100,6 +1103,7 @@ async def test_manual_hvac_off_should_take_the_lead_over_auto_start_stop(
|
||||
CONF_PRESENCE_SENSOR: "binary_sensor.presence_sensor",
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_TURBO,
|
||||
@@ -1267,6 +1271,7 @@ async def test_underlying_from_comes_back_to_life(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_UNDERLYING_LIST: ["climate.mock_climate"],
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_NONE,
|
||||
|
||||
@@ -130,7 +130,7 @@ async def test_power_feature_manager(
|
||||
# fmt:on
|
||||
|
||||
# Finish the mock configuration
|
||||
tpi_algo = PropAlgorithm(PROPORTIONAL_FUNCTION_TPI, 0.6, 0.01, 5, 0, "climate.vtherm")
|
||||
tpi_algo = PropAlgorithm(PROPORTIONAL_FUNCTION_TPI, 0.6, 0.01, 5, 0, 0, "climate.vtherm")
|
||||
tpi_algo._on_percent = 1 # pylint: disable="protected-access"
|
||||
type(fake_vtherm).hvac_mode = PropertyMock(return_value=HVACMode.HEAT)
|
||||
type(fake_vtherm).is_device_active = PropertyMock(return_value=is_device_active)
|
||||
@@ -354,6 +354,7 @@ async def test_power_management_hvac_off(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 100,
|
||||
@@ -462,6 +463,7 @@ async def test_power_management_hvac_on(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 100,
|
||||
@@ -629,6 +631,7 @@ async def test_power_management_energy_over_switch(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 100,
|
||||
@@ -761,6 +764,7 @@ async def test_power_management_energy_over_climate(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_UNDERLYING_LIST: ["climate.mock_climate"],
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 100,
|
||||
@@ -860,6 +864,7 @@ async def test_power_management_turn_off_while_shedding(hass: HomeAssistant, ski
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 100,
|
||||
|
||||
@@ -152,6 +152,7 @@ async def test_security_feature(hass: HomeAssistant, skip_hass_states_is_state):
|
||||
"tpi_coef_int": 0.3,
|
||||
"tpi_coef_ext": 0.01,
|
||||
"minimal_activation_delay": 30,
|
||||
"minimal_deactivation_delay": 0,
|
||||
"security_delay_min": 5, # 5 minutes
|
||||
"security_min_on_percent": 0.2,
|
||||
"security_default_on_percent": 0.1,
|
||||
@@ -346,6 +347,7 @@ async def test_security_feature_back_on_percent(
|
||||
"tpi_coef_int": 0.3,
|
||||
"tpi_coef_ext": 0.01,
|
||||
"minimal_activation_delay": 30,
|
||||
"minimal_deactivation_delay": 0,
|
||||
"safety_delay_min": 5, # 5 minutes
|
||||
"safety_min_on_percent": 0.2,
|
||||
"safety_default_on_percent": 0.1,
|
||||
@@ -624,6 +626,7 @@ async def test_security_over_climate(
|
||||
assert entity._saved_preset_mode == "none"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("expected_lingering_timers", [True])
|
||||
async def test_migration_security_safety(
|
||||
hass: HomeAssistant,
|
||||
skip_hass_states_is_state,
|
||||
@@ -656,6 +659,7 @@ async def test_migration_security_safety(
|
||||
CONF_USE_POWER_FEATURE: False,
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ async def test_sensors_over_switch(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 200,
|
||||
@@ -222,6 +223,7 @@ async def test_sensors_over_climate(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 1.5,
|
||||
@@ -358,6 +360,7 @@ async def test_sensors_over_climate_minimal(
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "climate.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
},
|
||||
|
||||
@@ -232,6 +232,7 @@ async def test_over_switch_deactivate_preset(
|
||||
CONF_HEATER_KEEP_ALIVE: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 10,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 10,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_PROP_FUNCTION: PROPORTIONAL_FUNCTION_TPI,
|
||||
CONF_TPI_COEF_INT: 0.6,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
|
||||
@@ -39,6 +39,7 @@ def config_entry() -> MockConfigEntry:
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.1,
|
||||
},
|
||||
|
||||
@@ -75,6 +75,7 @@ async def test_add_number_for_central_config(
|
||||
CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor",
|
||||
CONF_PRESET_POWER: 14,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 11,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 61,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
|
||||
@@ -170,6 +171,7 @@ async def test_add_number_for_central_config_without_temp(
|
||||
CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor",
|
||||
CONF_PRESET_POWER: 14,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 11,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 61,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
|
||||
@@ -265,6 +267,7 @@ async def test_add_number_for_central_config_without_temp_ac_mode(
|
||||
CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor",
|
||||
CONF_PRESET_POWER: 14,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 11,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 61,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
|
||||
@@ -359,6 +362,7 @@ async def test_add_number_for_central_config_without_temp_restore(
|
||||
CONF_MAX_POWER_SENSOR: "sensor.mock_central_max_power_sensor",
|
||||
CONF_PRESET_POWER: 14,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 11,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 61,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.2,
|
||||
@@ -700,7 +704,7 @@ async def test_add_number_for_over_switch_use_central_presets_and_restore(
|
||||
assert vtherm.use_central_config_temperature is True
|
||||
|
||||
# We should try to restore all 4 temp entities and the VTherm itself
|
||||
assert mock_restore_state.call_count == 4 + 1
|
||||
assert mock_restore_state.call_count == 4 + 2
|
||||
|
||||
# 1. We search for NumberEntities
|
||||
for preset_name, value in temps.items():
|
||||
|
||||
@@ -38,6 +38,7 @@ async def test_tpi_calculation(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
# CONF_DEVICE_POWER: 100,
|
||||
@@ -159,6 +160,94 @@ async def test_tpi_calculation(
|
||||
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_timers", [True])
|
||||
async def test_wrong_tpi_parameters(
|
||||
@@ -174,6 +263,7 @@ async def test_wrong_tpi_parameters(
|
||||
0.01,
|
||||
5,
|
||||
1,
|
||||
1,
|
||||
"entity_id",
|
||||
)
|
||||
# We should not be there
|
||||
@@ -190,6 +280,7 @@ async def test_wrong_tpi_parameters(
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
3,
|
||||
"entity_id",
|
||||
)
|
||||
# We should not be there
|
||||
@@ -206,6 +297,7 @@ async def test_wrong_tpi_parameters(
|
||||
0,
|
||||
2,
|
||||
3,
|
||||
3,
|
||||
"entity_id",
|
||||
)
|
||||
# We should not be there
|
||||
@@ -222,6 +314,7 @@ async def test_wrong_tpi_parameters(
|
||||
None,
|
||||
2,
|
||||
3,
|
||||
3,
|
||||
"entity_id",
|
||||
)
|
||||
# We should not be there
|
||||
@@ -238,6 +331,7 @@ async def test_wrong_tpi_parameters(
|
||||
0.00001,
|
||||
None,
|
||||
3,
|
||||
3,
|
||||
"entity_id",
|
||||
)
|
||||
# We should not be there
|
||||
@@ -262,6 +356,23 @@ async def test_wrong_tpi_parameters(
|
||||
# the normal case
|
||||
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
|
||||
try:
|
||||
algo = PropAlgorithm(
|
||||
@@ -270,6 +381,7 @@ async def test_wrong_tpi_parameters(
|
||||
0.00001,
|
||||
0,
|
||||
12,
|
||||
12,
|
||||
None,
|
||||
)
|
||||
# We should not be there
|
||||
|
||||
@@ -58,6 +58,7 @@ async def test_over_valve_full_start(
|
||||
PRESET_BOOST + PRESET_AWAY_SUFFIX + PRESET_TEMP_SUFFIX: 17.3,
|
||||
CONF_PRESET_POWER: 10,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_DEVICE_POWER: 100,
|
||||
@@ -350,6 +351,7 @@ async def test_over_valve_regulation(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 60,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
# only send new valve open percent if dtemp is > 30%
|
||||
@@ -589,6 +591,7 @@ async def test_bug_533(
|
||||
CONF_VALVE: "number.mock_valve",
|
||||
CONF_AUTO_REGULATION_DTEMP: 10, # This parameter makes the bug
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 60,
|
||||
},
|
||||
# | temps,
|
||||
|
||||
181
tests/test_virtual_switch.py
Normal file
181
tests/test_virtual_switch.py
Normal file
@@ -0,0 +1,181 @@
|
||||
""" Test of virtual switch """
|
||||
|
||||
# pylint: disable=wildcard-import, unused-wildcard-import, protected-access, line-too-long
|
||||
|
||||
from unittest.mock import patch, MagicMock, PropertyMock
|
||||
import pytest
|
||||
|
||||
from homeassistant.const import STATE_ON, STATE_OFF
|
||||
|
||||
from custom_components.versatile_thermostat.underlyings import UnderlyingSwitch
|
||||
from custom_components.versatile_thermostat.thermostat_switch import ThermostatOverSwitch
|
||||
from .commons import *
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"is_inversed, vswitch_on_command, vswitch_off_command, expected_command_on, expected_data_on, expected_state_on, expected_command_off, expected_data_off, expected_state_off, is_ok",
|
||||
[
|
||||
# Select (with stripping - trim)
|
||||
(
|
||||
False,
|
||||
" select_option/option:comfort ",
|
||||
" select_option/option:frost ",
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "comfort"},
|
||||
PRESET_COMFORT,
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "frost"},
|
||||
PRESET_FROST_PROTECTION,
|
||||
True,
|
||||
),
|
||||
# Inversed Select
|
||||
(
|
||||
True,
|
||||
"select_option/option:comfort",
|
||||
"select_option/option:eco",
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "eco"},
|
||||
PRESET_ECO,
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "comfort"},
|
||||
PRESET_COMFORT,
|
||||
True,
|
||||
),
|
||||
# switch
|
||||
(False, "turn_on", "turn_off", "turn_on", {"entity_id": "switch.test"}, STATE_ON, "turn_off", {"entity_id": "switch.test"}, STATE_OFF, True),
|
||||
# inversed switch
|
||||
(True, "turn_on", "turn_off", "turn_off", {"entity_id": "switch.test"}, STATE_OFF, "turn_on", {"entity_id": "switch.test"}, STATE_ON, True),
|
||||
# Climate
|
||||
(
|
||||
False,
|
||||
"set_hvac_mode/hvac_mode:heat",
|
||||
"set_hvac_mode/hvac_mode:off",
|
||||
"set_hvac_mode",
|
||||
{"entity_id": "switch.test", "hvac_mode": "heat"},
|
||||
HVACMode.HEAT,
|
||||
"set_hvac_mode",
|
||||
{"entity_id": "switch.test", "hvac_mode": "off"},
|
||||
HVACMode.OFF,
|
||||
True,
|
||||
),
|
||||
# Inversed Climate
|
||||
(
|
||||
True,
|
||||
"set_hvac_mode/hvac_mode:heat",
|
||||
"set_hvac_mode/hvac_mode:off",
|
||||
"set_hvac_mode",
|
||||
{"entity_id": "switch.test", "hvac_mode": "off"},
|
||||
HVACMode.OFF,
|
||||
"set_hvac_mode",
|
||||
{"entity_id": "switch.test", "hvac_mode": "heat"},
|
||||
HVACMode.HEAT,
|
||||
True,
|
||||
),
|
||||
# Inversed switch without command personnalisations
|
||||
(
|
||||
True,
|
||||
None,
|
||||
None,
|
||||
"turn_off",
|
||||
{"entity_id": "switch.test"},
|
||||
STATE_OFF,
|
||||
"turn_on",
|
||||
{"entity_id": "switch.test"},
|
||||
STATE_ON,
|
||||
True,
|
||||
),
|
||||
# Error cases invalid command
|
||||
(
|
||||
False,
|
||||
"select_ option/option:comfort", # whitespace
|
||||
"select_option/option:frost",
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "comfort"},
|
||||
PRESET_COMFORT,
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "frost"},
|
||||
PRESET_FROST_PROTECTION,
|
||||
False,
|
||||
),
|
||||
(
|
||||
False,
|
||||
"select_option/option comfort", # whitespace
|
||||
"select_option/option:frost",
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "comfort"},
|
||||
PRESET_COMFORT,
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "frost"},
|
||||
PRESET_FROST_PROTECTION,
|
||||
False,
|
||||
),
|
||||
(
|
||||
False,
|
||||
"select_option/option:com fort", # whitespace
|
||||
"select_option/option:frost",
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "comfort"},
|
||||
PRESET_COMFORT,
|
||||
"select_option",
|
||||
{"entity_id": "switch.test", "option": "frost"},
|
||||
PRESET_FROST_PROTECTION,
|
||||
False,
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_build_command(
|
||||
hass,
|
||||
is_inversed,
|
||||
vswitch_on_command,
|
||||
vswitch_off_command,
|
||||
expected_command_on,
|
||||
expected_data_on,
|
||||
expected_state_on,
|
||||
expected_command_off,
|
||||
expected_data_off,
|
||||
expected_state_off,
|
||||
is_ok,
|
||||
):
|
||||
"""Test the initialisation of a UnderlyingSwitch with some personnalisations commands"""
|
||||
|
||||
vtherm = MagicMock(spec=ThermostatOverSwitch)
|
||||
type(vtherm).is_inversed = PropertyMock(return_value=is_inversed)
|
||||
|
||||
assert vtherm.is_inversed == is_inversed
|
||||
|
||||
try:
|
||||
under = UnderlyingSwitch(hass, vtherm, "switch.test", 0, 0, vswitch_on_command, vswitch_off_command)
|
||||
except ValueError as e:
|
||||
if is_ok:
|
||||
pytest.fail(f"Initialization failed with ValueError: {e}")
|
||||
else:
|
||||
return
|
||||
|
||||
if not is_ok:
|
||||
pytest.fail("There should be a ValueError")
|
||||
return
|
||||
|
||||
assert under.is_inversed == is_inversed
|
||||
|
||||
assert under._on_command.get("command") == expected_command_on
|
||||
assert under._on_command.get("data") == expected_data_on
|
||||
assert under._on_command.get("state") == expected_state_on
|
||||
|
||||
assert under._off_command.get("command") == expected_command_off
|
||||
assert under._off_command.get("data") == expected_data_off
|
||||
assert under._off_command.get("state") == expected_state_off
|
||||
|
||||
# Calling turn-on
|
||||
# fmt: off
|
||||
with patch.object(under, "check_overpowering", return_value=True), \
|
||||
patch("homeassistant.core.ServiceRegistry.async_call") as mock_service_call:
|
||||
#fmt: on
|
||||
await under.turn_on()
|
||||
mock_service_call.assert_called_once_with("switch", expected_command_on, expected_data_on)
|
||||
|
||||
# Calling turn-off
|
||||
#fmt: off
|
||||
with patch("homeassistant.core.ServiceRegistry.async_call") as mock_service_call:
|
||||
#fmt: on
|
||||
await under.turn_off()
|
||||
mock_service_call.assert_called_once_with("switch", expected_command_off, expected_data_off)
|
||||
@@ -45,6 +45,7 @@ async def test_window_management_time_not_enough(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
|
||||
@@ -134,6 +135,7 @@ async def test_window_management_time_enough(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
|
||||
@@ -281,6 +283,7 @@ async def test_window_auto_fast(hass: HomeAssistant, skip_hass_states_is_state):
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1,
|
||||
@@ -490,6 +493,7 @@ async def test_window_auto_fast_and_sensor(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_SENSOR: "binary_sensor.fake_window_sensor",
|
||||
@@ -615,6 +619,7 @@ async def test_window_auto_auto_stop(hass: HomeAssistant, skip_hass_states_is_st
|
||||
CONF_USE_PRESENCE_FEATURE: False,
|
||||
CONF_CLIMATE: "switch.mock_climate",
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 6,
|
||||
@@ -783,6 +788,7 @@ async def test_window_auto_no_on_percent(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 6,
|
||||
@@ -910,6 +916,7 @@ async def test_window_bypass(hass: HomeAssistant, skip_hass_states_is_state):
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
|
||||
@@ -1050,6 +1057,7 @@ async def test_window_auto_bypass(hass: HomeAssistant, skip_hass_states_is_state
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 6,
|
||||
@@ -1178,6 +1186,7 @@ async def test_window_bypass_reactivate(hass: HomeAssistant, skip_hass_states_is
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_SENSOR: "binary_sensor.mock_window_sensor",
|
||||
@@ -1615,6 +1624,7 @@ async def test_window_action_eco_temp(hass: HomeAssistant, skip_hass_states_is_s
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1,
|
||||
@@ -1812,6 +1822,7 @@ async def test_window_action_frost_temp(hass: HomeAssistant, skip_hass_states_is
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_AUTO_OPEN_THRESHOLD: 0.1,
|
||||
@@ -2016,6 +2027,7 @@ async def test_bug_66(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.5,
|
||||
CONF_SAFETY_DEFAULT_ON_PERCENT: 0.1, # !! here
|
||||
@@ -2155,6 +2167,7 @@ async def test_window_action_frost_temp_preset_change(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_ACTION: CONF_WINDOW_FROST_TEMP,
|
||||
@@ -2265,6 +2278,7 @@ async def test_window_action_frost_temp_temp_change(
|
||||
CONF_TPI_COEF_INT: 0.3,
|
||||
CONF_TPI_COEF_EXT: 0.01,
|
||||
CONF_MINIMAL_ACTIVATION_DELAY: 30,
|
||||
CONF_MINIMAL_DEACTIVATION_DELAY: 0,
|
||||
CONF_SAFETY_DELAY_MIN: 5,
|
||||
CONF_SAFETY_MIN_ON_PERCENT: 0.3,
|
||||
CONF_WINDOW_ACTION: CONF_WINDOW_FROST_TEMP,
|
||||
|
||||
@@ -300,7 +300,7 @@ async def test_window_feature_manager_refresh_sensor_action_frost_only(
|
||||
with patch("homeassistant.core.StateMachine.get", return_value=State("sensor.the_motion_sensor", new_state)) as mock_get_state:
|
||||
# fmt:on
|
||||
# Configurer les méthodes mockées
|
||||
fake_vtherm.save_target_temp = AsyncMock()
|
||||
fake_vtherm.save_target_temp = MagicMock()
|
||||
fake_vtherm.set_hvac_off_reason = MagicMock()
|
||||
fake_vtherm.restore_target_temp = AsyncMock()
|
||||
fake_vtherm.change_target_temperature = AsyncMock()
|
||||
@@ -542,7 +542,7 @@ async def test_window_feature_manager_event_sensor_action_frost_only(
|
||||
with patch("homeassistant.helpers.condition.state", return_value=long_enough):
|
||||
# fmt:on
|
||||
# Configurer les méthodes mockées
|
||||
fake_vtherm.save_target_temp = AsyncMock()
|
||||
fake_vtherm.save_target_temp = MagicMock()
|
||||
fake_vtherm.set_hvac_off_reason = MagicMock()
|
||||
fake_vtherm.restore_target_temp = AsyncMock()
|
||||
fake_vtherm.change_target_temperature = AsyncMock()
|
||||
|
||||
Reference in New Issue
Block a user