Skip to content

Commit

Permalink
adapt to new FanEntity feature flags
Browse files Browse the repository at this point in the history
This remove a compatility warning.

fix #10
  • Loading branch information
mampfes committed Sep 11, 2024
1 parent d600815 commit 646d6cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion custom_components/bayernluefter/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ class BayernluefterFan(BayernluefterEntity, FanEntity):

# These fan specific attributes are not (yet) part of FanEntityDescription
_attr_speed_count = int_states_in_range(FAN_SPEED_RANGE)
_attr_supported_features = FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE
_attr_supported_features = (
FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF
| FanEntityFeature.SET_SPEED
| FanEntityFeature.PRESET_MODE
)
_enable_turn_on_off_backwards_compatibility = False
# _attr_preset_modes = [e.value for e in FanMode]

def __init__(
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Bayernlüfter",
"render_readme": true,
"homeassistant": "2023.9.0",
"homeassistant": "2024.8.0",
"country": "DE"
}

0 comments on commit 646d6cc

Please sign in to comment.