Skip to content

Commit

Permalink
Add support for 2024.8 FanEntityFeature TURN_ON and TURN_OFF (#95)
Browse files Browse the repository at this point in the history
This is required for the Heat Exchanger to be turned on and off in 2025.1, even though the blog mentions the deprecation will happen in 2025.2.
  • Loading branch information
cloudrainstar authored Jan 10, 2025
1 parent 4470ff2 commit 0e65725
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_components/jcihitachi_tw/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ def unique_id(self):

def calculate_supported_features(self):
support_flags = 0
if self._thing.support_code.Switch != "unsupported":
support_flags |= FanEntityFeature.TURN_ON
support_flags |= FanEntityFeature.TURN_OFF
if self._thing.support_code.FanSpeed != "unsupported":
support_flags |= FanEntityFeature.SET_SPEED
if self._thing.support_code.BreathMode != "unsupported":
Expand Down Expand Up @@ -277,4 +280,4 @@ def turn_off(self, **kwargs):
"""Turn the device off."""
_LOGGER.debug(f"Turn {self.name} off")
self.put_queue(status_name="Switch", status_str_value="off")
self.update()
self.update()

0 comments on commit 0e65725

Please sign in to comment.