Skip to content

Commit

Permalink
Improved support of the Xiaomi Smart Fan (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored Apr 16, 2018
1 parent 25ef8ab commit 476aadc
Show file tree
Hide file tree
Showing 4 changed files with 676 additions and 87 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Supported devices
- Xiaomi Philips LED Ball Lamp (:class:`miio.philips_bulb`)
- Xiaomi Philips Zhirui Smart LED Bulb E14 Candle Lamp (:class:`miio.philips_bulb`)
- Xiaomi Universal IR Remote Controller (Chuangmi IR) (:class:`miio.chuangmi_ir`)
- Xiaomi Mi Smart Fan (:class:`miio.fan`)
- Xiaomi Mi Smart Pedestal Fan (:class:`miio.fan`)
- Xiaomi Mi Air Humidifier (:class:`miio.airhumidifier`)
- Xiaomi Mi Water Purifier (Basic support: Turn on & off) (:class:`miio.waterpurifier`)
- Xiaomi PM2.5 Air Quality Monitor (:class:`miio.airqualitymonitor`)
Expand Down Expand Up @@ -55,7 +55,8 @@ Home Assistant support
- `Xiaomi Universal IR Remote Controller <https://home-assistant.io/components/remote.xiaomi_miio/>`__
- `Xiaomi Mi Air Quality Monitor (PM2.5) <https://home-assistant.io/components/sensor.xiaomi_miio/>`__
- `Xiaomi Mi Home Air Conditioner Companion <https://github.com/syssi/xiaomi_airconditioningcompanion>`__
- `Xiaomi Mi WiFi Repeater 2 <https://github.com/syssi/xiaomi_repeater>`__
- `Xiaomi Mi WiFi Repeater 2 <https://www.home-assistant.io/components/device_tracker.xiaomi_miio/>`__
- `Xiaomi Mi Smart Pedestal Fan <https://github.com/syssi/xiaomi_fan>`__


.. |PyPI version| image:: https://badge.fury.io/py/python-miio.svg
Expand Down
5 changes: 3 additions & 2 deletions miio/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
WaterPurifier, WifiSpeaker, WifiRepeater, Yeelight, Fan, )
from .chuangmi_plug import (MODEL_CHUANGMI_PLUG_V1, MODEL_CHUANGMI_PLUG_V3,
MODEL_CHUANGMI_PLUG_M1, )
from .fan import (MODEL_FAN_V2, MODEL_FAN_V3, )
from .powerstrip import (MODEL_POWER_STRIP_V1, MODEL_POWER_STRIP_V2, )

_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -52,8 +53,8 @@
"xiaomi-repeater-v1": WifiRepeater, # name needs to be checked
"xiaomi-repeater-v3": WifiRepeater, # name needs to be checked
"yeelink-light-": Yeelight,
"zhimi-fan-v2": Fan,
"zhimi-fan-v3": Fan,
"zhimi-fan-v2": partial(Fan, model=MODEL_FAN_V2),
"zhimi-fan-v3": partial(Fan, model=MODEL_FAN_V3),
"lumi-gateway-": lambda x: other_package_info(
x, "https://github.com/Danielhiversen/PyXiaomiGateway")
} # type: Dict[str, Union[Callable, Device]]
Expand Down
Loading

0 comments on commit 476aadc

Please sign in to comment.