Skip to content

Commit

Permalink
Add dmaker.fan.p30 (Mi Smart Standing Fan 2 P30) support (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingmercian authored Jul 7, 2024
1 parent 2b025ac commit 1460b01
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,27 @@ Credits: Thanks to [Rytilahti](https://github.com/rytilahti/python-miio) for all

## Supported devices

| Name | Model | Model no. | Specs |
| ----------------------- | ---------------------- | --------- | ----- |
| Pedestal Fan Fan V2 | zhimi.fan.v2 | | |
| Pedestal Fan Fan V3 | zhimi.fan.v3 | | |
| Pedestal Fan Fan SA1 | zhimi.fan.sa1 | | |
| Pedestal Fan Fan ZA1 | zhimi.fan.za1 | | |
| Pedestal Fan Fan ZA3 | zhimi.fan.za3 | | |
| Pedestal Fan Fan ZA4 | zhimi.fan.za4 | ZLBPLDS04ZM | |
| Smartmi Standing Fan 3 | zhimi.fan.za5 | | |
| Pedestal Fan Fan 1C | dmaker.fan.1c | | |
| Pedestal Fan Fan P5 | dmaker.fan.p5 | | |
| Pedestal Fan Fan P8 | dmaker.fan.p8 | | |
| Pedestal Fan Fan P9 | dmaker.fan.p9 | | |
| Pedestal Fan Fan P10 | dmaker.fan.p10 | | |
| Mijia Pedestal Fan | dmaker.fan.p11 | BPLDS03DM | 2800mAh, 24W, <=58dB |
| Smart Standing Fan 2 Pro| dmaker.fan.p33 | BPLDS03DM | 2800mAh, 24W, <=58dB |
| Pedestal Fan Fan P15 | dmaker.fan.p15 | | |
| Mi Smart Standing Fan 2 | dmaker.fan.p18 | BPLDS02DM | AC, 15W, 30.2-55.8bB |
| Rosou SS4 Ventilator | leshow.fan.ss4 | | |
| Xiaomi Smart Tower Fan | dmaker.fan.p39 | BPTS01DM | 22W, <=63dB |
| Name | Model | Model no. | Specs |
| ----------------------------| ---------------------- | --------- | ----- |
| Pedestal Fan Fan V2 | zhimi.fan.v2 | | |
| Pedestal Fan Fan V3 | zhimi.fan.v3 | | |
| Pedestal Fan Fan SA1 | zhimi.fan.sa1 | | |
| Pedestal Fan Fan ZA1 | zhimi.fan.za1 | | |
| Pedestal Fan Fan ZA3 | zhimi.fan.za3 | | |
| Pedestal Fan Fan ZA4 | zhimi.fan.za4 | ZLBPLDS04ZM | |
| Smartmi Standing Fan 3 | zhimi.fan.za5 | | |
| Pedestal Fan Fan 1C | dmaker.fan.1c | | |
| Pedestal Fan Fan P5 | dmaker.fan.p5 | | |
| Pedestal Fan Fan P8 | dmaker.fan.p8 | | |
| Pedestal Fan Fan P9 | dmaker.fan.p9 | | |
| Pedestal Fan Fan P10 | dmaker.fan.p10 | | |
| Mijia Pedestal Fan | dmaker.fan.p11 | BPLDS03DM | 2800mAh, 24W, <=58dB |
| Smart Standing Fan 2 Pro | dmaker.fan.p33 | BPLDS03DM | 2800mAh, 24W, <=58dB |
| Pedestal Fan Fan P15 | dmaker.fan.p15 | | |
| Mi Smart Standing Fan 2 P18 | dmaker.fan.p18 | BPLDS02DM | AC, 15W, 30.2-55.8bB |
| Mi Smart Standing Fan 2 P30 | dmaker.fan.p30 | BPLDS02DM | AC, 15W, 30.2-55.8bB |
| Rosou SS4 Ventilator | leshow.fan.ss4 | | |
| Xiaomi Smart Tower Fan | dmaker.fan.p39 | BPTS01DM | 22W, <=63dB |


## Features
Expand Down
8 changes: 5 additions & 3 deletions custom_components/xiaomi_miio_fan/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
MODEL_FAN_P10 = "dmaker.fan.p10" # Pedestal Fan Fan P10
MODEL_FAN_P11 = "dmaker.fan.p11" # Mijia Pedestal Fan
MODEL_FAN_P15 = "dmaker.fan.p15" # Pedestal Fan Fan P15
MODEL_FAN_P18 = "dmaker.fan.p18" # Mi Smart Standing Fan 2
MODEL_FAN_P18 = "dmaker.fan.p18" # Mi Smart Standing Fan 2 P18
MODEL_FAN_P30 = "dmaker.fan.p30" # Mi Smart Standing Fan 2 P30
MODEL_FAN_P33 = "dmaker.fan.p33" # Mi Smart Standing Fan Pro 2
MODEL_FAN_P39 = "dmaker.fan.p39" # Smart Tower Fan
MODEL_FAN_LESHOW_SS4 = "leshow.fan.ss4"
Expand All @@ -101,6 +102,7 @@
MODEL_FAN_P11,
MODEL_FAN_P15,
MODEL_FAN_P18,
MODEL_FAN_P30,
MODEL_FAN_P33,
MODEL_FAN_P39,
MODEL_FAN_LESHOW_SS4,
Expand Down Expand Up @@ -478,7 +480,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
device = XiaomiFanMiot(
name, fan, model, unique_id, retries, preset_modes_override
)
elif model in [MODEL_FAN_P10, MODEL_FAN_P18]:
elif model in [MODEL_FAN_P10, MODEL_FAN_P18, MODEL_FAN_P30]:
fan = FanMiot(host, token, model=MODEL_FAN_P10)
device = XiaomiFanMiot(
name, fan, model, unique_id, retries, preset_modes_override
Expand Down Expand Up @@ -1072,7 +1074,7 @@ async def async_set_delay_off(self, delay_off_countdown: int) -> None:


class XiaomiFanMiot(XiaomiFanP5):
"""Representation of a Xiaomi Pedestal Fan P9, P10, P11, P18."""
"""Representation of a Xiaomi Pedestal Fan P9, P10, P11, P18, P30."""

pass

Expand Down

0 comments on commit 1460b01

Please sign in to comment.