mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Xiaomi Power Strip services added. (#4931)
This commit is contained in:
parent
434f6f2510
commit
041553ed86
@ -13,12 +13,38 @@ ha_version: 0.56
|
||||
ha_iot_class: "Local Polling"
|
||||
---
|
||||
|
||||
The `xiaomi_miio` switch platform allows you to control the state of your Xiaomi Smart WiFi Socket aka Plug or Xiaomi Smart Power Strip.
|
||||
|
||||
Currently, the supported features are `on`, `off`. If the device provides the current load, it will be reported.
|
||||
The `xiaomi_miio` switch platform allows you to control the state of your Xiaomi Smart WiFi Socket aka Plug, Xiaomi Smart Power Strip and Xiaomi Chuangmi Plug V1.
|
||||
|
||||
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.
|
||||
|
||||
## Features
|
||||
|
||||
### Xiaomi Smart WiFi Socket
|
||||
|
||||
* Power (on, off)
|
||||
* Attributes
|
||||
- Temperature
|
||||
|
||||
### Xiaomi Chuangmi Plug V1
|
||||
|
||||
* Power (on, off)
|
||||
* USB (on, off)
|
||||
* Attributes
|
||||
- Temperature
|
||||
|
||||
### Xiaomi Smart Power Strip
|
||||
|
||||
* Power (on, off)
|
||||
* Wifi LED (on, off)
|
||||
* Power Price (0...999)
|
||||
* Power Mode (green, normal) (Power Strip V1 only)
|
||||
* Attributes
|
||||
- Temperature
|
||||
- Current
|
||||
- Load power
|
||||
- Wifi LED
|
||||
- Mode (Power Strip V1 only)
|
||||
|
||||
To add a plug to your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
@ -35,7 +61,7 @@ Configuration variables:
|
||||
- **host** (*Required*): The IP of your miio device.
|
||||
- **token** (*Required*): The API token of your miio device.
|
||||
- **name** (*Optional*): The name of your miio device.
|
||||
- **model** (*Optional*): The model of your miio device. Valid values are chuangmi.plug.v1`, `qmi.powerstrip.v1`, `zimi.powerstrip.v2`, `chuangmi.plug.m1` and `chuangmi.plug.v2`. This setting can be used to bypass the device model detection and is recommended if your device isn't always available.
|
||||
- **model** (*Optional*): The model of your miio device. Valid values are `chuangmi.plug.v1`, `qmi.powerstrip.v1`, `zimi.powerstrip.v2`, `chuangmi.plug.m1` and `chuangmi.plug.v2`. This setting can be used to bypass the device model detection and is recommended if your device isn't always available.
|
||||
|
||||
{% configuration %}
|
||||
host:
|
||||
@ -56,3 +82,39 @@ model:
|
||||
required: false
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
## {% linkable_title Platform Services %}
|
||||
|
||||
### {% linkable_title Service `switch.xiaomi_miio_set_wifi_led_on` %} (Power Strip only)
|
||||
|
||||
Turn the wifi led on.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `switch.xiaomi_miio_set_wifi_led_off` %} (Power Strip only)
|
||||
|
||||
Turn the wifi led off.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
|
||||
### {% linkable_title Service `switch.xiaomi_miio_set_power_price` %} (Power Strip)
|
||||
|
||||
Set the power price.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific air purifier. Else targets all. |
|
||||
| `price` | no | Power price, between 0 and 999. |
|
||||
|
||||
### {% linkable_title Service `switch.xiaomi_miio_set_power_mode` %} (Power Strip V1 only)
|
||||
|
||||
Set the power mode.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
|---------------------------|----------|---------------------------------------------------------------|
|
||||
| `entity_id` | yes | Only act on a specific xiaomi miio entity. Else targets all. |
|
||||
| `mode` | no | Power mode, valid values are 'normal' and 'green' |
|
||||
|
Loading…
x
Reference in New Issue
Block a user