Skip to content

Commit

Permalink
fix(target temperature): disable setting temperature when feature is off
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkaldheim committed Oct 11, 2023
1 parent 7654622 commit b4c19fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/fujitsu_airstage/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ def target_temperature(self) -> float | None:
"""Return the current target temperature."""
if self.hvac_mode == HVACMode.FAN_ONLY:
return self._ac.get_display_temperature()
if int(self._ac.get_target_temperature()) >= 6553:
return self._ac.get_display_temperature()
return self._ac.get_target_temperature()

async def async_set_temperature(self, **kwargs: Any) -> None:
Expand Down Expand Up @@ -226,7 +228,7 @@ def supported_features(self) -> ClimateEntityFeature:
"""Return the list of supported features."""
supported_features = ClimateEntityFeature.FAN_MODE

if self.hvac_mode != HVACMode.FAN_ONLY:
if self.hvac_mode != HVACMode.FAN_ONLY and int(self._ac.get_target_temperature()) < 6553:
supported_features |= ClimateEntityFeature.TARGET_TEMPERATURE

if self.swing_mode:
Expand Down

0 comments on commit b4c19fd

Please sign in to comment.