Add Xiaomi Miio Plug config flow (#16539)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
starkillerOG 2021-02-22 14:39:06 +01:00 committed by GitHub
parent a7c17c8fbc
commit 80b75ec2f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,23 +206,7 @@ Please follow the instructions on [Retrieving the Access Token](/integrations/xi
### Configuration flow setup
To set up the Xiaomi gateway, click Configuration in the sidebar, then click Integrations and then click the + icon in the lower right and find xiaomi_miio. Select the option "Connect to a Xiaomi Gateway" and click submit. You will then be presented with a form in which you will need to fill in the "IP address" and 32 characters "token". Optionally, you can specify a different name for the gateway. After you click submit, you will have the opportunity to select the area that your devices are located.
{% configuration %}
host:
description: The IP address of your Xiaomi gateway.
required: true
type: string
token:
description: The API token of your Xiaomi gateway [Retrieving the Access Token](/integrations/xiaomi_miio/#retrieving-the-access-token).
required: true
type: string
name:
description: The name of your Xiaomi gateway.
required: false
type: string
default: Xiaomi Gateway
{% endconfiguration %}
To set up the Xiaomi gateway, click Configuration in the sidebar, then click Integrations and then click the + icon in the lower right and find xiaomi_miio. You will then be presented with a form in which you will need to fill in the "IP address" and 32 characters "token". After you click submit, you will have the opportunity to select the area that your devices are located.
### Supported Xiaomi gateway models:
@ -1719,7 +1703,11 @@ Turn the eyecare mode off.
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](/integrations/xiaomi_miio/#retrieving-the-access-token) to get the API token to use in the `configuration.yaml` file.
Please follow the instructions on [Retrieving the Access Token](/integrations/xiaomi_miio/#retrieving-the-access-token) to get the API token to use during configuration flow setup.
### Configuration
To add a plug to your installation, click Configuration in the sidebar, then click Integrations and then click the + icon in the lower right and find xiaomi_miio. You will then be presented with a form in which you will need to fill in the “IP address” and 32 characters “token”. After you click submit, you will have the opportunity to select the area that your devices are located.
### Features
@ -1763,38 +1751,6 @@ Supported models: `lumi.acpartner.v3` (the socket of the `acpartner.v1` and `v2`
- Attributes
- Load power
### Configuration
To add a plug to your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entries
switch:
- platform: xiaomi_miio
host: MIIO_IP_ADDRESS
token: YOUR_TOKEN
```
{% configuration %}
host:
description: The IP address of your miio device.
required: true
type: string
token:
description: The API token of your miio device.
required: true
type: string
name:
description: The name of your miio device.
required: false
type: string
default: Xiaomi Miio Switch
model:
description: The model of your miio device. Valid values are `chuangmi.plug.v1`, `qmi.powerstrip.v1`, `zimi.powerstrip.v2`, `chuangmi.plug.m1`, `chuangmi.plug.m3`, `chuangmi.plug.v2`, `chuangmi.plug.v3`, `chuangmi.plug.hmi205` and `chuangmi.plug.hmi208`. This setting can be used to bypass the device model detection and is recommended if your device isn't always available.
required: false
type: string
{% endconfiguration %}
### Platform Services
### Service `xiaomi_miio.switch_set_wifi_led_on` (Power Strip only)