From 9666bd4461316b08260c03d5509864dd1c137258 Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Mon, 18 Jul 2022 16:13:22 +0200 Subject: [PATCH] Add support for Xiaomi Smart Standing Fan 2 Pro (dmaker.fan.p33) (#1467) --- README.rst | 2 +- miio/integrations/fan/dmaker/fan_miot.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 4a929e1ab..33feaad4e 100644 --- a/README.rst +++ b/README.rst @@ -128,7 +128,7 @@ Supported devices - Xiaomi Philips Zhirui Bedroom Smart Lamp - Huayi Huizuo Lamps - Xiaomi Universal IR Remote Controller (Chuangmi IR) -- Xiaomi Mi Smart Pedestal Fan V2, V3, SA1, ZA1, ZA3, ZA4, ZA5 1C, P5, P9, P10, P11 +- Xiaomi Mi Smart Pedestal Fan V2, V3, SA1, ZA1, ZA3, ZA4, ZA5 1C, P5, P9, P10, P11, P33 - Xiaomi Rosou SS4 Ventilator (leshow.fan.ss4) - Xiaomi Mi Air Humidifier V1, CA1, CA4, CB1, MJJSQ, JSQ, JSQ1, JSQ001 - Xiaomi Mi Water Purifier (Basic support: Turn on & off) diff --git a/miio/integrations/fan/dmaker/fan_miot.py b/miio/integrations/fan/dmaker/fan_miot.py index 57ff32b7b..191010198 100644 --- a/miio/integrations/fan/dmaker/fan_miot.py +++ b/miio/integrations/fan/dmaker/fan_miot.py @@ -12,6 +12,7 @@ MODEL_FAN_P11 = "dmaker.fan.p11" MODEL_FAN_P15 = "dmaker.fan.p15" MODEL_FAN_P18 = "dmaker.fan.p18" +MODEL_FAN_P33 = "dmaker.fan.p33" MODEL_FAN_1C = "dmaker.fan.1c" @@ -59,6 +60,21 @@ "power_off_time": {"siid": 3, "piid": 1}, "set_move": {"siid": 6, "piid": 1}, }, + MODEL_FAN_P33: { + # Source https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:fan:0000A005:dmaker-p33:1 + "power": {"siid": 2, "piid": 1}, + "fan_level": {"siid": 2, "piid": 2}, + "mode": {"siid": 2, "piid": 3}, + "swing_mode": {"siid": 2, "piid": 4}, + "swing_mode_angle": {"siid": 2, "piid": 5}, + "fan_speed": {"siid": 2, "piid": 6}, + "light": {"siid": 4, "piid": 1}, + "buzzer": {"siid": 5, "piid": 1}, + # "device_fault": {"siid": 6, "piid": 2}, + "child_lock": {"siid": 7, "piid": 1}, + "power_off_time": {"siid": 3, "piid": 1}, + "set_move": {"siid": 6, "piid": 1}, + }, } @@ -85,6 +101,7 @@ MODEL_FAN_P9: [30, 60, 90, 120, 150], MODEL_FAN_P10: [30, 60, 90, 120, 140], MODEL_FAN_P11: [30, 60, 90, 120, 140], + MODEL_FAN_P33: [30, 60, 90, 120, 140], }