From 460e90b59c3619d9b09113a9e3372ca7bc957dcc Mon Sep 17 00:00:00 2001 From: Ben Vezzani Date: Sun, 25 Aug 2024 18:29:26 -0400 Subject: [PATCH] Home Assistant compatibility update: Fan On/Off (#186) --- custom_components/dyson_local/fan.py | 10 +++++++++- custom_components/dyson_local/manifest.json | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/custom_components/dyson_local/fan.py b/custom_components/dyson_local/fan.py index 7bb3a27..fe139be 100644 --- a/custom_components/dyson_local/fan.py +++ b/custom_components/dyson_local/fan.py @@ -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( @@ -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 diff --git a/custom_components/dyson_local/manifest.json b/custom_components/dyson_local/manifest.json index 3622ec2..7357afd 100644 --- a/custom_components/dyson_local/manifest.json +++ b/custom_components/dyson_local/manifest.json @@ -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 }