From 85dcac9530b9b6b57b6e3013283c2c105c8a7171 Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Fri, 26 Jan 2024 18:07:54 +0000 Subject: [PATCH] Add config option --- custom_components/versatile_thermostat/config_schema.py | 1 + custom_components/versatile_thermostat/const.py | 2 ++ custom_components/versatile_thermostat/strings.json | 4 ++++ custom_components/versatile_thermostat/translations/en.json | 4 ++++ custom_components/versatile_thermostat/translations/fr.json | 4 ++++ tests/const.py | 1 + 6 files changed, 16 insertions(+) diff --git a/custom_components/versatile_thermostat/config_schema.py b/custom_components/versatile_thermostat/config_schema.py index 9108aed..1021560 100644 --- a/custom_components/versatile_thermostat/config_schema.py +++ b/custom_components/versatile_thermostat/config_schema.py @@ -143,6 +143,7 @@ STEP_THERMOSTAT_CLIMATE = vol.Schema( # pylint: disable=invalid-name mode="dropdown", ) ), + vol.Optional(CONF_AUTO_REGULATION_USE_INTERNAL_TEMP, default=False): cv.boolean, } ) diff --git a/custom_components/versatile_thermostat/const.py b/custom_components/versatile_thermostat/const.py index 3f3dc84..fe27265 100644 --- a/custom_components/versatile_thermostat/const.py +++ b/custom_components/versatile_thermostat/const.py @@ -105,6 +105,7 @@ CONF_AUTO_REGULATION_STRONG = "auto_regulation_strong" CONF_AUTO_REGULATION_EXPERT = "auto_regulation_expert" CONF_AUTO_REGULATION_DTEMP = "auto_regulation_dtemp" CONF_AUTO_REGULATION_PERIOD_MIN = "auto_regulation_periode_min" +CONF_AUTO_REGULATION_USE_INTERNAL_TEMP = "auto_regulation_use_internal_temp" CONF_INVERSE_SWITCH = "inverse_switch_command" CONF_AUTO_FAN_MODE = "auto_fan_mode" CONF_AUTO_FAN_NONE = "auto_fan_none" @@ -255,6 +256,7 @@ ALL_CONF = ( CONF_AUTO_REGULATION_MODE, CONF_AUTO_REGULATION_DTEMP, CONF_AUTO_REGULATION_PERIOD_MIN, + CONF_AUTO_REGULATION_USE_INTERNAL_TEMP, CONF_INVERSE_SWITCH, CONF_AUTO_FAN_MODE, CONF_USE_MAIN_CENTRAL_CONFIG, diff --git a/custom_components/versatile_thermostat/strings.json b/custom_components/versatile_thermostat/strings.json index f578231..a056262 100644 --- a/custom_components/versatile_thermostat/strings.json +++ b/custom_components/versatile_thermostat/strings.json @@ -59,6 +59,7 @@ "auto_regulation_mode": "Self-regulation", "auto_regulation_dtemp": "Regulation threshold", "auto_regulation_periode_min": "Regulation minimal period", + "auto_regulation_use_internal_temp": "Use internal temperature of the underlying", "inverse_switch_command": "Inverse switch command", "auto_fan_mode": " Auto fan mode" }, @@ -80,6 +81,7 @@ "auto_regulation_mode": "Auto adjustment of the target temperature", "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_internal_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" } @@ -294,6 +296,7 @@ "auto_regulation_mode": "Self-regulation", "auto_regulation_dtemp": "Regulation threshold", "auto_regulation_periode_min": "Regulation minimal period", + "auto_regulation_use_internal_temp": "Use internal temperature of the underlying", "inverse_switch_command": "Inverse switch command", "auto_fan_mode": " Auto fan mode" }, @@ -315,6 +318,7 @@ "auto_regulation_mode": "Auto adjustment of the target temperature", "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_internal_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" } diff --git a/custom_components/versatile_thermostat/translations/en.json b/custom_components/versatile_thermostat/translations/en.json index f578231..a056262 100644 --- a/custom_components/versatile_thermostat/translations/en.json +++ b/custom_components/versatile_thermostat/translations/en.json @@ -59,6 +59,7 @@ "auto_regulation_mode": "Self-regulation", "auto_regulation_dtemp": "Regulation threshold", "auto_regulation_periode_min": "Regulation minimal period", + "auto_regulation_use_internal_temp": "Use internal temperature of the underlying", "inverse_switch_command": "Inverse switch command", "auto_fan_mode": " Auto fan mode" }, @@ -80,6 +81,7 @@ "auto_regulation_mode": "Auto adjustment of the target temperature", "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_internal_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" } @@ -294,6 +296,7 @@ "auto_regulation_mode": "Self-regulation", "auto_regulation_dtemp": "Regulation threshold", "auto_regulation_periode_min": "Regulation minimal period", + "auto_regulation_use_internal_temp": "Use internal temperature of the underlying", "inverse_switch_command": "Inverse switch command", "auto_fan_mode": " Auto fan mode" }, @@ -315,6 +318,7 @@ "auto_regulation_mode": "Auto adjustment of the target temperature", "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_internal_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" } diff --git a/custom_components/versatile_thermostat/translations/fr.json b/custom_components/versatile_thermostat/translations/fr.json index 45432bb..88004e9 100644 --- a/custom_components/versatile_thermostat/translations/fr.json +++ b/custom_components/versatile_thermostat/translations/fr.json @@ -59,6 +59,7 @@ "auto_regulation_mode": "Auto-régulation", "auto_regulation_dtemp": "Seuil de régulation", "auto_regulation_periode_min": "Période minimale de régulation", + "auto_regulation_use_internal_temp": "Utiliser la température interne du sous-jacent", "inverse_switch_command": "Inverser la commande", "auto_fan_mode": " Auto ventilation mode" }, @@ -80,6 +81,7 @@ "auto_regulation_mode": "Ajustement automatique de la température cible", "auto_regulation_dtemp": "Le seuil en ° (ou % pour les valves) en-dessous duquel la régulation ne sera pas envoyée", "auto_regulation_periode_min": "La durée en minutes entre deux mise à jour faites par la régulation", + "auto_regulation_use_internal_temp": "Utiliser 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" } @@ -306,6 +308,7 @@ "auto_regulation_mode": "Auto-regulation", "auto_regulation_dtemp": "Seuil de régulation", "auto_regulation_periode_min": "Période minimale de régulation", + "auto_regulation_use_internal_temp": "Utiliser la température interne du sous-jacent", "inverse_switch_command": "Inverser la commande", "auto_fan_mode": " Auto fan mode" }, @@ -327,6 +330,7 @@ "auto_regulation_mode": "Ajustement automatique de la consigne", "auto_regulation_dtemp": "Le seuil en ° (ou % pour les valves) en-dessous duquel la régulation ne sera pas envoyée", "auto_regulation_periode_min": "La durée en minutes entre deux mise à jour faites par la régulation", + "auto_regulation_use_internal_temp": "Utiliser 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" } diff --git a/tests/const.py b/tests/const.py index 71699fd..b9023bd 100644 --- a/tests/const.py +++ b/tests/const.py @@ -108,6 +108,7 @@ MOCK_TH_OVER_CLIMATE_TYPE_CONFIG = { CONF_AUTO_REGULATION_DTEMP: 0.5, CONF_AUTO_REGULATION_PERIOD_MIN: 2, CONF_AUTO_FAN_MODE: CONF_AUTO_FAN_HIGH, + CONF_AUTO_REGULATION_USE_INTERNAL_TEMP: False, } MOCK_TH_OVER_CLIMATE_TYPE_NOT_REGULATED_CONFIG = {