diff --git a/miio/chuangmi_plug.py b/miio/chuangmi_plug.py index 4072902cf..b52a33dbd 100644 --- a/miio/chuangmi_plug.py +++ b/miio/chuangmi_plug.py @@ -14,12 +14,14 @@ MODEL_CHUANGMI_PLUG_V1 = 'chuangmi.plug.v1' MODEL_CHUANGMI_PLUG_M1 = 'chuangmi.plug.m1' MODEL_CHUANGMI_PLUG_V2 = 'chuangmi.plug.v2' +MODEL_CHUANGMI_PLUG_HMI205 = 'chuangmi.plug.hmi205' AVAILABLE_PROPERTIES = { MODEL_CHUANGMI_PLUG_V1: ['on', 'usb_on', 'temperature'], MODEL_CHUANGMI_PLUG_V3: ['on', 'usb_on', 'temperature', 'wifi_led'], MODEL_CHUANGMI_PLUG_M1: ['power', 'temperature'], MODEL_CHUANGMI_PLUG_V2: ['power', 'temperature'], + MODEL_CHUANGMI_PLUG_HMI205: ['power', 'temperature'], } @@ -93,7 +95,7 @@ def __json__(self): class ChuangmiPlug(Device): - """Main class representing the Chuangmi Plug V1 and V3.""" + """Main class representing the Chuangmi Plug.""" def __init__(self, ip: str = None, token: str = None, start_id: int = 0, debug: int = 0, lazy_discover: bool = True, diff --git a/miio/discovery.py b/miio/discovery.py index be6aafa82..bb9f2ca93 100644 --- a/miio/discovery.py +++ b/miio/discovery.py @@ -15,7 +15,7 @@ from .airconditioningcompanion import (MODEL_ACPARTNER_V1, MODEL_ACPARTNER_V2, MODEL_ACPARTNER_V3, ) from .airhumidifier import (MODEL_HUMIDIFIER_CA1, MODEL_HUMIDIFIER_V1, ) from .chuangmi_plug import (MODEL_CHUANGMI_PLUG_V1, MODEL_CHUANGMI_PLUG_V3, - MODEL_CHUANGMI_PLUG_M1, ) + MODEL_CHUANGMI_PLUG_M1, MODEL_CHUANGMI_PLUG_HMI205, ) from .fan import (MODEL_FAN_V2, MODEL_FAN_V3, MODEL_FAN_SA1, MODEL_FAN_ZA1, ) from .powerstrip import (MODEL_POWER_STRIP_V1, MODEL_POWER_STRIP_V2, ) @@ -30,6 +30,7 @@ "chuangmi-plug-v1": partial(ChuangmiPlug, model=MODEL_CHUANGMI_PLUG_V1), "chuangmi-plug_": partial(ChuangmiPlug, model=MODEL_CHUANGMI_PLUG_V1), "chuangmi-plug-v3": partial(ChuangmiPlug, model=MODEL_CHUANGMI_PLUG_V3), + "chuangmi-plug-hmi205": partial(ChuangmiPlug, model=MODEL_CHUANGMI_PLUG_HMI205), "qmi-powerstrip-v1": partial(PowerStrip, model=MODEL_POWER_STRIP_V1), "zimi-powerstrip-v2": partial(PowerStrip, model=MODEL_POWER_STRIP_V2), "zhimi-airpurifier-m1": AirPurifier, # mini model