From f27de0079329a49c616d1b0eea35270210bcf7ad Mon Sep 17 00:00:00 2001 From: William Date: Sun, 12 May 2024 20:03:56 -0400 Subject: [PATCH] time for a longhorn reset --- custom_components/localtuya/climate.py | 15 --------------- custom_components/localtuya/const.py | 2 -- custom_components/localtuya/strings.json | 2 -- custom_components/localtuya/translations/en.json | 2 -- custom_components/localtuya/translations/it.json | 2 -- .../localtuya/translations/pt-BR.json | 2 -- 6 files changed, 25 deletions(-) diff --git a/custom_components/localtuya/climate.py b/custom_components/localtuya/climate.py index da61fa7..da23cfa 100644 --- a/custom_components/localtuya/climate.py +++ b/custom_components/localtuya/climate.py @@ -47,8 +47,6 @@ from .const import ( CONF_HVAC_ACTION_SET, CONF_HVAC_MODE_DP, CONF_HVAC_MODE_SET, - CONF_HVAC_ONOFF_SEPARATE, - CONF_HVAC_ONOFF_DP, CONF_MAX_TEMP_DP, CONF_MIN_TEMP_DP, CONF_PRECISION, @@ -164,8 +162,6 @@ 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_ONOFF_DP): vol.In(dps), 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), @@ -200,8 +196,6 @@ 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 @@ -214,10 +208,6 @@ class LocaltuyaClimate(LocalTuyaEntity, ClimateEntity): self._conf_hvac_mode_set = HVAC_MODE_SETS.get( self._config.get(CONF_HVAC_MODE_SET), {} ) - - self._conf_hvac_onoff_separate = self._config.get(CONF_HVAC_ONOFF_SEPARATE) - self._conf_hvac_onoff_dp = self._config.get(CONF_HVAC_ONOFF_DP) - self._conf_hvac_fan_mode_dp = self._config.get(CONF_HVAC_FAN_MODE_DP) self._conf_hvac_fan_mode_set = HVAC_FAN_MODE_SETS.get( self._config.get(CONF_HVAC_FAN_MODE_SET), {} @@ -392,11 +382,6 @@ class LocaltuyaClimate(LocalTuyaEntity, ClimateEntity): if hvac_mode == HVACMode.OFF: await self._device.set_dp(False, self._dp_id) return - if self._conf_hvac_onoff_separate: - if hvac_mode == HVACMode.OFF: - await self._device.set_dp(False, self._conf_hvac_onoff_dp) - else: - await self._device.set_dp(True, self._conf_hvac_onoff_dp) if not self._state and self._conf_hvac_mode_dp != self._dp_id: await self._device.set_dp(True, self._dp_id) # Some thermostats need a small wait before sending another update diff --git a/custom_components/localtuya/const.py b/custom_components/localtuya/const.py index d087b3c..75f7bbd 100644 --- a/custom_components/localtuya/const.py +++ b/custom_components/localtuya/const.py @@ -97,8 +97,6 @@ CONF_PRECISION = "precision" CONF_TARGET_PRECISION = "target_precision" CONF_HVAC_MODE_DP = "hvac_mode_dp" CONF_HVAC_MODE_SET = "hvac_mode_set" -CONF_HVAC_ONOFF_SEPARATE = "hvac_onoff_separate" -CONF_HVAC_ONOFF_DP = "hvac_onoff_dp" CONF_HVAC_FAN_MODE_DP = "hvac_fan_mode_dp" CONF_HVAC_FAN_MODE_SET = "hvac_fan_mode_set" CONF_HVAC_SWING_MODE_DP = "hvac_swing_mode_dp" diff --git a/custom_components/localtuya/strings.json b/custom_components/localtuya/strings.json index eb477ca..32f6040 100644 --- a/custom_components/localtuya/strings.json +++ b/custom_components/localtuya/strings.json @@ -115,8 +115,6 @@ "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/OFF DP from HVAC Modes", - "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 d10221d..8fdbb60 100644 --- a/custom_components/localtuya/translations/en.json +++ b/custom_components/localtuya/translations/en.json @@ -189,8 +189,6 @@ "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/OFF DP from HVAC Modes", - "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 4f79389..264bb97 100644 --- a/custom_components/localtuya/translations/it.json +++ b/custom_components/localtuya/translations/it.json @@ -177,8 +177,6 @@ "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 dispone di DP ON/OFF separato dalle modalità HVAC", - "hvac_onoff_dp":"ON/OFF 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 3596fe3..74884ee 100644 --- a/custom_components/localtuya/translations/pt-BR.json +++ b/custom_components/localtuya/translations/pt-BR.json @@ -177,8 +177,6 @@ "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 possui DP ON/OFF separado dos modos HVAC", - "hvac_onoff_dp":"ON/OFF 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)",