lets try this
This commit is contained in:
@@ -213,6 +213,10 @@ class LocaltuyaClimate(LocalTuyaEntity, ClimateEntity):
|
|||||||
self._conf_hvac_mode_set = HVAC_MODE_SETS.get(
|
self._conf_hvac_mode_set = HVAC_MODE_SETS.get(
|
||||||
self._config.get(CONF_HVAC_MODE_SET), {}
|
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_dp = self._config.get(CONF_HVAC_FAN_MODE_DP)
|
||||||
self._conf_hvac_fan_mode_set = HVAC_FAN_MODE_SETS.get(
|
self._conf_hvac_fan_mode_set = HVAC_FAN_MODE_SETS.get(
|
||||||
self._config.get(CONF_HVAC_FAN_MODE_SET), {}
|
self._config.get(CONF_HVAC_FAN_MODE_SET), {}
|
||||||
@@ -387,6 +391,11 @@ class LocaltuyaClimate(LocalTuyaEntity, ClimateEntity):
|
|||||||
if hvac_mode == HVACMode.OFF:
|
if hvac_mode == HVACMode.OFF:
|
||||||
await self._device.set_dp(False, self._dp_id)
|
await self._device.set_dp(False, self._dp_id)
|
||||||
return
|
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:
|
if not self._state and self._conf_hvac_mode_dp != self._dp_id:
|
||||||
await self._device.set_dp(True, self._dp_id)
|
await self._device.set_dp(True, self._dp_id)
|
||||||
# Some thermostats need a small wait before sending another update
|
# Some thermostats need a small wait before sending another update
|
||||||
|
Reference in New Issue
Block a user