mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Xiaomi MiIO Fan: Xiaomi Air Humidifier integration (#4829)
* Xiaomi Air Humidifier integration.
* List of supported features improved
* Device independent service descriptions, missing model added to config schema, structure
* ✏️ Corrected brand namings
This commit is contained in:
parent
491c79598d
commit
786949d0a2
@ -1,7 +1,7 @@
|
||||
---
|
||||
layout: page
|
||||
title: "Xiaomi Air Purifier"
|
||||
description: "Instructions on how to integrate your Xiaomi Air Purifier within Home Assistant."
|
||||
description: "Instructions on how to integrate your Xiaomi Air Purifier and Xiaomi Air Humidifier within Home Assistant."
|
||||
date: 2017-10-13 12:35
|
||||
sidebar: true
|
||||
comments: false
|
||||
@ -13,35 +13,161 @@ ha_version: 0.57
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
The `xiaomi_miio` fan platform allows you to control the Xiaomi Air Purifier 2, Air Purifier 2S and Air Purifier Pro.
|
||||
The `xiaomi_miio` fan platform allows you to control the Xiaomi Air Purifier and Xiaomi Air Humidifier.
|
||||
|
||||
Currently, the supported features are:
|
||||
## Features
|
||||
|
||||
* On, Off
|
||||
### Air Purifier 2 et al.
|
||||
|
||||
* Power (on, off)
|
||||
* Operation modes (auto, silent, favorite, idle)
|
||||
* Buzzer (on, off)
|
||||
* Child lock (on, off)
|
||||
* LED (on, off), LED brightness (bright, dim, off)
|
||||
* Favorite Level (0...16)
|
||||
* Attributes
|
||||
- power
|
||||
- aqi
|
||||
- average_aqi
|
||||
- humidity
|
||||
- model
|
||||
- temperature
|
||||
- humidity
|
||||
- aqi
|
||||
- mode
|
||||
- filter_hours_used
|
||||
- filter_life_remaining
|
||||
- favorite_level
|
||||
- child_lock
|
||||
- led
|
||||
- motor_speed
|
||||
- average_aqi
|
||||
- purify_volume
|
||||
- learn_mode
|
||||
- sleep_time
|
||||
- sleep_mode_learn_count
|
||||
- extra_features
|
||||
- turbo_mode_supported
|
||||
- auto_detect
|
||||
- use_time
|
||||
- button_pressed
|
||||
- buzzer
|
||||
- led_brightness
|
||||
- sleep_mode
|
||||
|
||||
### Air Purifier Pro (zhimi.airpurifier.v6)
|
||||
|
||||
* Power (on, off)
|
||||
* Operation modes (auto, silent, favorite)
|
||||
* Child lock (on, off)
|
||||
* LED (on, off)
|
||||
* Favorite Level (0...16)
|
||||
* Attributes
|
||||
- model
|
||||
- temperature
|
||||
- humidity
|
||||
- aqi
|
||||
- mode
|
||||
- filter_hours_used
|
||||
- filter_life_remaining
|
||||
- favorite_level
|
||||
- child_lock
|
||||
- led
|
||||
- motor_speed
|
||||
- average_aqi
|
||||
- purify_volume
|
||||
- learn_mode
|
||||
- sleep_time
|
||||
- sleep_mode_learn_count
|
||||
- extra_features
|
||||
- turbo_mode_supported
|
||||
- auto_detect
|
||||
- use_time
|
||||
- button_pressed
|
||||
- filter_rfid_product_id
|
||||
- filter_rfid_tag
|
||||
- filter_type
|
||||
- illuminance
|
||||
- motor2_speed
|
||||
- volume
|
||||
|
||||
### Air Purifier V3 (zhimi.airpurifier.v3)
|
||||
|
||||
* Power (on, off)
|
||||
* Operation modes (auto, silent, favorite, idle, medium, high, strong)
|
||||
* Child lock (on, off)
|
||||
* LED (on, off)
|
||||
* Attributes
|
||||
- model
|
||||
- aqi
|
||||
- mode
|
||||
- led
|
||||
- buzzer
|
||||
- child_lock
|
||||
- purify_volume
|
||||
- filter_life_remaining
|
||||
- illuminance
|
||||
- filter_hours_used
|
||||
- filter_life_remaining
|
||||
- motor_speed
|
||||
- average_aqi
|
||||
- volume
|
||||
- motor2_speed
|
||||
- filter_rfid_product_id
|
||||
- filter_rfid_tag
|
||||
- filter_type
|
||||
- purify_volume
|
||||
- learn_mode
|
||||
- sleep_time
|
||||
- sleep_mode_learn_count
|
||||
- extra_features
|
||||
- auto_detect
|
||||
- use_time
|
||||
- button_pressed
|
||||
|
||||
### Air Humidifier (zhimi.humidifier.v1)
|
||||
|
||||
Please follow the instructions on [Retrieving the Access Token](/components/vacuum.xiaomi_miio/#retrieving-the-access-token) to get the API token.
|
||||
* On, Off
|
||||
* Operation modes (silent, medium, high)
|
||||
* Buzzer (on, off)
|
||||
* Child lock (on, off)
|
||||
* LED brightness (bright, dim, off)
|
||||
* Target humidity (30, 40, 50, 60, 70, 80)
|
||||
* Attributes
|
||||
- model
|
||||
- temperature
|
||||
- humidity
|
||||
- mode
|
||||
- buzzer
|
||||
- child_lock
|
||||
- trans_level
|
||||
- target_humidity
|
||||
- led_brightness
|
||||
- button_pressed
|
||||
- use_time
|
||||
- hardware_version
|
||||
|
||||
### Air Humidifier CA (zhimi.humidifier.ca1)
|
||||
|
||||
* On, Off
|
||||
* Operation modes (silent, medium, high, auto)
|
||||
* Buzzer (on, off)
|
||||
* Child lock (on, off)
|
||||
* LED brightness (bright, dim, off)
|
||||
* Target humidity (30, 40, 50, 60, 70, 80)
|
||||
* Dry mode (on, off)
|
||||
* Attributes
|
||||
- model
|
||||
- temperature
|
||||
- humidity
|
||||
- mode
|
||||
- buzzer
|
||||
- child_lock
|
||||
- trans_level
|
||||
- target_humidity
|
||||
- led_brightness
|
||||
- button_pressed
|
||||
- use_time
|
||||
- hardware_version
|
||||
- speed
|
||||
- depth
|
||||
- dry
|
||||
|
||||
Please follow the instructions on [Retrieving the Access Token](/components/vacuum.xiaomi_miio/#retrieving-the-access-token) to get the API token to use in the `configuration.yaml` file.
|
||||
|
||||
To add a Xiaomi Air Purifier to your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
@ -67,6 +193,10 @@ name:
|
||||
required: false
|
||||
type: string
|
||||
default: Xiaomi Air Purifier
|
||||
model:
|
||||
description: The model of your device.
|
||||
required: false
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
## {% linkable_title Platform Services %}
|
||||
@ -80,37 +210,37 @@ Set the fan speed/operation mode.
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| `speed` | no | Fan speed. Valid values are 'Auto', 'Silent', 'Favorite' and 'Idle' |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_buzzer_on` %}
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_buzzer_on` %} (Air Purifier Pro excluded)
|
||||
|
||||
Turn the buzzer on.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|-------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_buzzer_off` %}
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_buzzer_off` %} (Air Purifier Pro excluded)
|
||||
|
||||
Turn the buzzer off.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_led_on` %}
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_led_on` %} (Air Purifier only)
|
||||
|
||||
Turn the led on.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_led_off` %}
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_led_off` %} (Air Purifier only)
|
||||
|
||||
Turn the led off.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_child_lock_on` %}
|
||||
|
||||
@ -118,7 +248,7 @@ Turn the child lock on.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_child_lock_off` %}
|
||||
|
||||
@ -126,23 +256,105 @@ Turn the child lock off.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_led_brightness` %}
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_led_brightness` %} (Air Purifier Pro excluded)
|
||||
|
||||
Set the led brightness. Supported values are 0 (Bright), 1 (Dim), 2 (Off).
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
| `brightness` | no | Brightness, between 0 and 2. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_favorite_level` %}
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_favorite_level` %} (Air Purifier only)
|
||||
|
||||
Set the favorite level of the operation mode "favorite".
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
| `level` | no | Level, between 0 and 16. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_auto_detect_on` %} (Air Purifier Pro only)
|
||||
|
||||
Turn the auto detect on.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_auto_detect_off` %} (Air Purifier Pro only)
|
||||
|
||||
Turn the auto detect off.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_learn_mode_on` %} (Air Purifier 2 only)
|
||||
|
||||
Turn the learn mode on.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_learn_mode_off` %} (Air Purifier 2 only)
|
||||
|
||||
Turn the learn mode off.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_volume` %} (Air Purifier Pro only)
|
||||
|
||||
Set the sound volume.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
| `volume` | no | Volume, between 0 and 100. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_reset_filter` %} (Air Purifier 2 only)
|
||||
|
||||
Reset the filter lifetime and usage.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_extra_features` %} (Air Purifier only)
|
||||
|
||||
Set the extra features.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
| `features` | no | Integer, known values are 0 and 1. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_target_humidity` %} (Air Humidifier only)
|
||||
|
||||
Set the target humidity.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|-----------------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
| `humidity` | no | Target humidity. Allowed values are 30, 40, 50, 60, 70 and 80 |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_dry_on` %} (Air Humidifier CA only)
|
||||
|
||||
Turn the dry mode on.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `fan.xiaomi_miio_set_dry_off` %} (Air Humidifier CA only)
|
||||
|
||||
Turn the dry mode off.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific Xiaomi miIO fan entity. Else targets all. |
|
||||
|
Loading…
x
Reference in New Issue
Block a user