Skip to content

Commit

Permalink
Add zhimi.humidfier.ca4 as supported model (rytilahti#1220)
Browse files Browse the repository at this point in the history
* Add zhimi.humidfier.ca4 as supported model

* fix lint
  • Loading branch information
jbouwh authored and impankratov committed Dec 12, 2021
1 parent dbe6b47 commit 69cc7ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions miio/airhumidifier_miot.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,16 @@ def clean_mode(self) -> bool:
return self.data["clean_mode"]


SMARTMI_EVAPORATIVE_HUMIDIFIER_2 = "zhimi.humidfier.ca4"

SUPPORTED_MODELS = [SMARTMI_EVAPORATIVE_HUMIDIFIER_2]


class AirHumidifierMiot(MiotDevice):
"""Main class representing the air humidifier which uses MIoT protocol."""

_supported_models = SUPPORTED_MODELS

mapping = _MAPPING

@command(
Expand Down
2 changes: 2 additions & 0 deletions miio/philips_bulb.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
MODEL_PHILIPS_LIGHT_BULB = "philips.light.bulb"
MODEL_PHILIPS_LIGHT_HBULB = "philips.light.hbulb"
MODEL_PHILIPS_ZHIRUI_DOWNLIGHT = "philips.light.downlight"
MODEL_PHILIPS_LIGHT_CANDLE_BULB = "philips.light.candle"

AVAILABLE_PROPERTIES_COMMON = ["power", "dv"]
AVAILABLE_PROPERTIES_COLORTEMP = AVAILABLE_PROPERTIES_COMMON + ["bright", "cct", "snm"]
Expand All @@ -21,6 +22,7 @@
MODEL_PHILIPS_LIGHT_HBULB: AVAILABLE_PROPERTIES_COMMON + ["bri"],
MODEL_PHILIPS_LIGHT_BULB: AVAILABLE_PROPERTIES_COLORTEMP,
MODEL_PHILIPS_ZHIRUI_DOWNLIGHT: AVAILABLE_PROPERTIES_COLORTEMP,
MODEL_PHILIPS_LIGHT_CANDLE_BULB: AVAILABLE_PROPERTIES_COLORTEMP,
}


Expand Down

0 comments on commit 69cc7ce

Please sign in to comment.