Skip to content

Commit

Permalink
Air Conditionner set DRY temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
alicesalse-bmg committed Oct 30, 2024
1 parent ca404c9 commit 8690b87
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions custom_components/cozytouch/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,13 @@ def _handle_coordinator_update(self) -> None:
# Target value
if self._attr_hvac_mode in (
HVACMode.OFF,
HVACMode.DRY,
HVACMode.FAN_ONLY,
HVACMode.FAN_ONLY
):
self._native_value = None
elif (
self._attr_hvac_mode == HVACMode.COOL
self._attr_hvac_mode in (
HVACMode.COOL,
HVACMode.DRY )
and "targetCoolCapabilityId" in self._capability
):
self._native_value = float(
Expand All @@ -224,7 +225,10 @@ def _handle_coordinator_update(self) -> None:

# Lowest adjustment value
if (
self._attr_hvac_mode == HVACMode.COOL
self._attr_hvac_mode in (
HVACMode.COOL,
HVACMode.DRY,
HVACMode.AUTO )
and "lowestCoolValueCapabilityId" in self._capability
):
lowestValueId = self._capability.get("lowestCoolValueCapabilityId", None)
Expand All @@ -239,7 +243,10 @@ def _handle_coordinator_update(self) -> None:

# Highest adjustment value
if (
self._attr_hvac_mode == HVACMode.COOL
self._attr_hvac_mode in (
HVACMode.COOL,
HVACMode.DRY,
HVACMode.AUTO )
and "highestCoolValueCapabilityId" in self._capability
):
highestValueId = self._capability["highestCoolValueCapabilityId"]
Expand Down Expand Up @@ -367,7 +374,9 @@ async def async_set_temperature(self, **kwargs):
await self.async_set_preset_mode(PRESET_OVERRIDE)

if (
self._attr_hvac_mode == HVACMode.COOL
self._attr_hvac_mode in (
HVACMode.COOL,
HVACMode.DRY )
and "targetCoolCapabilityId" in self._capability
):
await self.coordinator.set_capability_value(
Expand Down

0 comments on commit 8690b87

Please sign in to comment.