Skip to content

Commit

Permalink
Merge pull request #70 from litinoveweedle/fix_fan_compat
Browse files Browse the repository at this point in the history
fix HA2024.8.0 fan entity features compatibility
  • Loading branch information
michaelarnauts authored Sep 5, 2024
2 parents bd10483 + 734ad3b commit 10e2329
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
check:
@poetry run ruff check
@poetry run ruff format --check

codefix:
@poetry run ruff format
@poetry run ruff check --fix
@poetry run ruff format

.PHONY: check codefix
3 changes: 2 additions & 1 deletion custom_components/comfoconnect/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ async def async_setup_entry(
class ComfoConnectFan(FanEntity):
"""Representation of the ComfoConnect fan platform."""

_attr_enable_turn_on_off_backwards_compatibility = False
_attr_icon = "mdi:air-conditioner"
_attr_should_poll = False
_attr_supported_features = FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE
_attr_supported_features = FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE | FanEntityFeature.TURN_ON | FanEntityFeature.TURN_OFF
_attr_preset_modes = list(PRESET_MODES)
_attr_speed_count = len(FAN_SPEEDS)
_attr_has_entity_name = True
Expand Down

0 comments on commit 10e2329

Please sign in to comment.