Skip to content

Commit

Permalink
fix(climate): Quickfix target temperature is none, issue #16
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkaldheim committed Nov 2, 2023
1 parent 637c0f1 commit fc2e313
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/fujitsu_airstage/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ def __init__(self, instance: AirstageData, ac_key: str) -> None:
@property
def target_temperature(self) -> float | None:
"""Return the current target temperature."""
target_temp = self._ac.get_target_temperature()
if (
self.hvac_mode == HVACMode.FAN_ONLY
or int(self._ac.get_target_temperature()) >= 6000
or target_temp == None
or int(target_temp) >= 6000
):
return self.current_temperature
return self._ac.get_target_temperature()
return target_temp

async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
Expand Down

0 comments on commit fc2e313

Please sign in to comment.