From 03691ba8dd83a0c274ba393b90cf7a8ef8a83b0f Mon Sep 17 00:00:00 2001 From: kei81131 <111072203+kei81131@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:47:56 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=AD=20improve=20for=20zhimi.fan.fb1=20?= =?UTF-8?q?(#1812)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xiaomi_miot/core/device_customizes.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/custom_components/xiaomi_miot/core/device_customizes.py b/custom_components/xiaomi_miot/core/device_customizes.py index 0c6a1ea02..7af0878ab 100644 --- a/custom_components/xiaomi_miot/core/device_customizes.py +++ b/custom_components/xiaomi_miot/core/device_customizes.py @@ -1699,6 +1699,41 @@ 'brightness_for_on': 0, 'brightness_for_off': 2, }, + 'zhimi.fan.fb1': { + 'extend_miot_specs': [ + { + 'iid': 2, + 'properties': [ + {'iid': 5, 'value-range': [30, 120, 30]}, + {'iid': 6, 'value-range': [30, 90, 30]}, + ], + }, + { + 'iid': 5, + 'properties': [ + { + 'iid': 6, + 'value-list': [ + {'value': 'left', 'description': 'Turn Left'}, + {'value': 'right', 'description': 'Turn Right'}, + ], + }, + { + 'iid': 7, + 'value-list': [ + {'value': 'up', 'description': 'Turn Up'}, + {'value': 'down', 'description': 'Turn Down'}, + ], + }, + ], + }, + ], + 'switch_properties': 'alarm,horizontal_swing,vertical_swing,oscillating,h_swing_back,v_swing_back', + 'number_properties': 'timing', + 'percentage_property': 'stepless_fan_level', + 'select_properties': 'mode,horizontal_angle,vertical_angle', + 'button_properties': 'h_swing_step_move,v_swing_step_move' + }, 'zhimi.fan.za3': { 'miot_type': 'urn:miot-spec-v2:device:fan:0000A005:zhimi-za3:3', 'number_select_properties': 'fan_level',