home-assistant.io/source/_components/switch.xiaomi_miio.markdown
Piotr Żuralski 6cbcc1acdc fixing ha_category components annotation (#9432)
* fixing ha_category components annotation

Signed-off-by: Piotr Żuralski <piotr.zuralski@gmail.com>

* ✏️ Tweak
2019-05-11 09:46:28 +02:00

4.5 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_iot_class, ha_release
layout title description date sidebar comments sharing footer logo ha_category ha_iot_class ha_release
page Xiaomi Smart WiFi Socket and Smart Power Strip Instructions on how to integrate your Xiaomi Smart WiFi Socket aka Plug or Xiaomi Smart Power Strip within Home Assistant. 2017-08-26 10:18 true false true true xiaomi.png
Switch
Local Polling 0.56

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 to get the API token to use in the configuration.yaml file.

{% linkable_title Features %}

{% linkable_title Xiaomi Smart WiFi Socket %}

Supported models: chuangmi.plug.m1, chuangmi.plug.m3, chuangmi.plug.v2, chuangmi.plug.hmi205

  • Power (on, off)
  • Attributes
    • Temperature

{% linkable_title Xiaomi Chuangmi Plug V1 %}

Supported models: chuangmi.plug.v1, chuangmi.plug.v3

  • Power (on, off)
  • USB (on, off)
  • Attributes
    • Temperature

{% linkable_title Xiaomi Smart Power Strip %}

Supported models: qmi.powerstrip.v1, zimi.powerstrip.v2

  • 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)

{% linkable_title Xiaomi Air Conditioning Companion V3 %}

Supported models: lumi.acpartner.v3 (the socket of the acpartner.v1 and v2 isn't switchable!)

  • Power (on, off)
  • Attributes
    • Load power

{% linkable_title Configuration %}

To add a plug to your installation, add the following to your configuration.yaml file:

# 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 and chuangmi.plug.hmi205. 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 %}

{% 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 Xiaomi miio switch entity. 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 Xiaomi miio switch entity. 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 Xiaomi miio switch entity. 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 switch entity. Else targets all.
mode no Power mode, valid values are 'normal' and 'green'