diff --git a/miio/integrations/dmaker/fan/fan_miot.py b/miio/integrations/dmaker/fan/fan_miot.py index fa5c4d6e7..ed4b96323 100644 --- a/miio/integrations/dmaker/fan/fan_miot.py +++ b/miio/integrations/dmaker/fan/fan_miot.py @@ -24,6 +24,7 @@ class MoveDirection(enum.Enum): MODEL_FAN_P15 = "dmaker.fan.p15" MODEL_FAN_P18 = "dmaker.fan.p18" MODEL_FAN_P33 = "dmaker.fan.p33" +MODEL_FAN_P39 = "dmaker.fan.p39" MODEL_FAN_P45 = "dmaker.fan.p45" MODEL_FAN_1C = "dmaker.fan.1c" @@ -87,6 +88,20 @@ class MoveDirection(enum.Enum): "power_off_time": {"siid": 3, "piid": 1}, "set_move": {"siid": 6, "piid": 1}, }, + MODEL_FAN_P39: { + # https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:fan:0000A005:dmaker-p39:1 + "power": {"siid": 2, "piid": 1}, + "fan_level": {"siid": 2, "piid": 2}, + "mode": {"siid": 2, "piid": 4}, + "swing_mode": {"siid": 2, "piid": 5}, + "swing_mode_angle": {"siid": 2, "piid": 6}, + "power_off_time": {"siid": 2, "piid": 8}, + "set_move": {"siid": 2, "piid": 10, "access": ["write"]}, + "fan_speed": {"siid": 2, "piid": 11}, + "child_lock": {"siid": 3, "piid": 1}, + "buzzer": {"siid": 2, "piid": 7}, + "light": {"siid": 2, "piid": 9}, + }, MODEL_FAN_P45: { # Source https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:fan:0000A005:dmaker-p45:1 "power": {"siid": 2, "piid": 1}, @@ -129,6 +144,7 @@ class MoveDirection(enum.Enum): MODEL_FAN_P15: [30, 60, 90, 120, 140], # mapped to P11 MODEL_FAN_P18: [30, 60, 90, 120, 140], # mapped to P10 MODEL_FAN_P33: [30, 60, 90, 120, 140], + MODEL_FAN_P39: [30, 60, 90, 120, 140], MODEL_FAN_P45: [30, 60, 90, 120, 150], }