Skip to content

Commit 10e2329

Browse files
Merge pull request #70 from litinoveweedle/fix_fan_compat
fix HA2024.8.0 fan entity features compatibility
2 parents bd10483 + 734ad3b commit 10e2329

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
check:
22
@poetry run ruff check
3+
@poetry run ruff format --check
34

45
codefix:
5-
@poetry run ruff format
66
@poetry run ruff check --fix
7+
@poetry run ruff format
78

89
.PHONY: check codefix

custom_components/comfoconnect/fan.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ async def async_setup_entry(
5151
class ComfoConnectFan(FanEntity):
5252
"""Representation of the ComfoConnect fan platform."""
5353

54+
_attr_enable_turn_on_off_backwards_compatibility = False
5455
_attr_icon = "mdi:air-conditioner"
5556
_attr_should_poll = False
56-
_attr_supported_features = FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE
57+
_attr_supported_features = FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE | FanEntityFeature.TURN_ON | FanEntityFeature.TURN_OFF
5758
_attr_preset_modes = list(PRESET_MODES)
5859
_attr_speed_count = len(FAN_SPEEDS)
5960
_attr_has_entity_name = True

0 commit comments

Comments
 (0)