syssi / xiaomi_airpurifier

Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier integration for Home Assistant
Apache License 2.0
449 stars 110 forks source link

Implement Humidifier as Humidifier Entity #77

Open barnabyjones opened 3 years ago

barnabyjones commented 3 years ago

Hi,

Would it be possible to add support for the deerma.humidifier.mjjsq climate control? I have it working as a "fan", but I can't set the target humidity value. When I configure is as "climate" I get an unsupported model error.

Cheers.

syssi commented 3 years ago

You've to use the xiaomi_miio_airpurifier.fan_set_target_humidity service to set the target humidity. There is no nice user interface to control the target humidity right now. If the ClimateEntity provides a user interface i will move the air humidifier devices to this entity some day.

barnabyjones commented 3 years ago

Thank you! I've been able to use that service to set the target humidity in my automatons. I'm still learning HA, but I think as you say the ClimateEntity would provide a nice user interface for controlling fan speed and target humidity.

bieniu commented 3 years ago

Shouldn't humidifiers use a humidifier platform?

syssi commented 3 years ago

I wasn't aware of this "new" platform. Thanks for the hint!

barnabyjones commented 3 years ago

@bieniu Good point about the Humidifier Platform!

Looking at the documentation, it appears that the platform supports the following services: humidifier.set_mode, humidifier.set_humidity, humidifier.turn_on, humidifier.turn_off, humidifier.toggle

If the humidifier.set_mode service can support the various fan modes (low, medium, high) in addition to a target humidity then it would be perfect.

PizzaPino commented 3 years ago

This would also expose the entities properly in HomeKit including humidity properties.

dedors commented 3 years ago

If this change is done, is there anything holding back for official xiaomi_miio HA support?