Skip to content

Commit

Permalink
Home Assistant compatibility update: Fan On/Off (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotvezz authored Aug 25, 2024
1 parent 428c7ae commit 460e90b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion custom_components/dyson_local/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@

SPEED_RANGE = (1, 10)

COMMON_FEATURES = FanEntityFeature.OSCILLATE | FanEntityFeature.SET_SPEED | FanEntityFeature.PRESET_MODE
COMMON_FEATURES = (
FanEntityFeature.OSCILLATE
| FanEntityFeature.SET_SPEED
| FanEntityFeature.PRESET_MODE
| FanEntityFeature.TURN_ON
| FanEntityFeature.TURN_OFF
)


async def async_setup_entry(
Expand Down Expand Up @@ -82,6 +88,8 @@ async def async_setup_entry(
class DysonFanEntity(DysonEntity, FanEntity):
"""Dyson fan entity base class."""

_enable_turn_on_off_backwards_compatibility = False

_MESSAGE_TYPE = MessageType.STATE

@property
Expand Down
2 changes: 1 addition & 1 deletion custom_components/dyson_local/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"import_executor": true,
"iot_class": "local_push",
"issue_tracker": "https://github.com/libdyson-wg/ha-dyson/issues",
"version": "1.4.0-rc3",
"version": "1.4.1",
"import_executor": true
}

0 comments on commit 460e90b

Please sign in to comment.