From 093e970ae9e856b92839196706bc2b30a81335f6 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Sun, 8 Apr 2018 21:32:21 +0200 Subject: [PATCH 1/2] mDNS discovery: Xiaomi Smart Fans added --- miio/discovery.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/miio/discovery.py b/miio/discovery.py index 3138f7860..5cbaba2e8 100644 --- a/miio/discovery.py +++ b/miio/discovery.py @@ -9,7 +9,7 @@ from . import (Device, Vacuum, ChuangmiPlug, PowerStrip, AirPurifier, Ceil, PhilipsBulb, PhilipsEyecare, ChuangmiIr, AirHumidifier, - WaterPurifier, WifiSpeaker, WifiRepeater, Yeelight, ) + WaterPurifier, WifiSpeaker, WifiRepeater, Yeelight, Fan, ) from .chuangmi_plug import (MODEL_CHUANGMI_PLUG_V1, MODEL_CHUANGMI_PLUG_V3, MODEL_CHUANGMI_PLUG_M1, ) @@ -51,6 +51,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, "lumi-gateway-": lambda x: other_package_info( x, "https://github.com/Danielhiversen/PyXiaomiGateway") } # type: Dict[str, Union[Callable, Device]] From f8da121c6374ab1ca363fa8deef03a316f8a12e0 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Sun, 8 Apr 2018 21:44:34 +0200 Subject: [PATCH 2/2] Syntax fixed --- miio/discovery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miio/discovery.py b/miio/discovery.py index 5cbaba2e8..82831b3fc 100644 --- a/miio/discovery.py +++ b/miio/discovery.py @@ -51,8 +51,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": Fan, + "zhimi-fan-v3": Fan, "lumi-gateway-": lambda x: other_package_info( x, "https://github.com/Danielhiversen/PyXiaomiGateway") } # type: Dict[str, Union[Callable, Device]]