From a065a4576455704f817c9cd34b0eda7106e1cb6d Mon Sep 17 00:00:00 2001 From: William Date: Thu, 9 May 2024 21:31:55 -0400 Subject: [PATCH] implement UI changes --- custom_components/localtuya/climate.py | 3 +++ custom_components/localtuya/strings.json | 2 ++ custom_components/localtuya/translations/en.json | 2 ++ custom_components/localtuya/translations/it.json | 2 ++ custom_components/localtuya/translations/pt-BR.json | 2 ++ 5 files changed, 11 insertions(+) diff --git a/custom_components/localtuya/climate.py b/custom_components/localtuya/climate.py index da23cfa..3bf144d 100644 --- a/custom_components/localtuya/climate.py +++ b/custom_components/localtuya/climate.py @@ -162,6 +162,7 @@ def flow_schema(dps): ), vol.Optional(CONF_HVAC_MODE_DP): vol.In(dps), vol.Optional(CONF_HVAC_MODE_SET): vol.In(list(HVAC_MODE_SETS.keys())), + vol.Optional(CONF_HVAC_ONOFF_SEPARATE, default=False): bool, vol.Optional(CONF_HVAC_FAN_MODE_DP): vol.In(dps), vol.Optional(CONF_HVAC_FAN_MODE_SET): vol.In(list(HVAC_FAN_MODE_SETS.keys())), vol.Optional(CONF_HVAC_ACTION_DP): vol.In(dps), @@ -196,6 +197,8 @@ class LocaltuyaClimate(LocalTuyaEntity, ClimateEntity): self._target_temperature = None self._current_temperature = None self._hvac_mode = None + self._hvac_onoff_separate = None + self._hvac_onoff_dp = None self._fan_mode = None self._swing_mode = None self._preset_mode = None diff --git a/custom_components/localtuya/strings.json b/custom_components/localtuya/strings.json index 32f6040..6cd3fdc 100644 --- a/custom_components/localtuya/strings.json +++ b/custom_components/localtuya/strings.json @@ -115,6 +115,8 @@ "temperature_unit": "Temperature Unit (optional)", "hvac_mode_dp": "HVAC Mode DP (optional)", "hvac_mode_set": "HVAC Mode Set (optional)", + "hvac_onoff_separate": "Device has separate \"On\" and \"Off\" DP", + "hvac_onoff_dp":"On\\Off DP", "hvac_action_dp": "HVAC Current Action DP (optional)", "hvac_action_set": "HVAC Current Action Set (optional)", "preset_dp": "Presets DP (optional)", diff --git a/custom_components/localtuya/translations/en.json b/custom_components/localtuya/translations/en.json index 8fdbb60..44927dd 100644 --- a/custom_components/localtuya/translations/en.json +++ b/custom_components/localtuya/translations/en.json @@ -189,6 +189,8 @@ "temperature_unit": "Temperature Unit (optional)", "hvac_mode_dp": "HVAC Mode DP (optional)", "hvac_mode_set": "HVAC Mode Set (optional)", + "hvac_onoff_separate": "Device has separate \"On\" and \"Off\" DP", + "hvac_onoff_dp":"On\\Off DP", "hvac_fan_mode_dp": "HVAC Fan Mode DP (optional)", "hvac_fan_mode_set": "HVAC Fan Mode Set (optional)", "hvac_swing_mode_dp": "HVAC Swing Mode DP (optional)", diff --git a/custom_components/localtuya/translations/it.json b/custom_components/localtuya/translations/it.json index 264bb97..0626a63 100644 --- a/custom_components/localtuya/translations/it.json +++ b/custom_components/localtuya/translations/it.json @@ -177,6 +177,8 @@ "temperature_unit": "Unità di temperatura (opzionale)", "hvac_mode_dp": "Modalità HVAC attuale (opzionale)", "hvac_mode_set": "Impostazione modalità HVAC (opzionale)", + "hvac_onoff_separate": "Il dispositivo ha DP \"On\" e \"Off\" separati", + "hvac_onoff_dp":"Acceso\\Spento DP", "hvac_action_dp": "Azione HVAC attuale (opzionale)", "hvac_action_set": "Impostazione azione HVAC (opzionale)", "preset_dp": "Preset DP (opzionale)", diff --git a/custom_components/localtuya/translations/pt-BR.json b/custom_components/localtuya/translations/pt-BR.json index 74884ee..becaa63 100644 --- a/custom_components/localtuya/translations/pt-BR.json +++ b/custom_components/localtuya/translations/pt-BR.json @@ -177,6 +177,8 @@ "temperature_unit": "Unidade de Temperatura (opcional)", "hvac_mode_dp": "Modo HVAC DP (opcional)", "hvac_mode_set": "Conjunto de modo HVAC (opcional)", + "hvac_onoff_separate": "O dispositivo tem DP \"Ligado\" e \"Desligado\" separados", + "hvac_onoff_dp":"Ligado\\Desligado DP", "hvac_action_dp": "Ação atual de HVAC DP (opcional)", "hvac_action_set": "Conjunto de ação atual HVAC (opcional)", "preset_dp": "Predefinições DP (opcional)",