home-assistant.io/source/_components/switch.xiaomi_miio.markdown
Alok Saboo 1aca7b08cf Misc fixes: e.g. -> e.g., and proper case for Home Assistant (#4942)
* e.g. to e.g., and proper case for Home Assistant

* Instructions how to -> Instructions on how to
2018-03-17 20:20:37 +01:00

2.0 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_version, ha_iot_class
layout title description date sidebar comments sharing footer logo ha_category ha_version ha_iot_class
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 0.56 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.

Please follow the instructions on Retrieving the Access Token to get the API token to use in the configuration.yaml file.

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

# Example configuration.yaml entries
switch:
  - platform: xiaomi_miio
    name: Original Xiaomi Mi Smart WiFi Socket
    host: 192.168.130.59
    token: YOUR_TOKEN
    model: chuangmi.plug.m1

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.m1andchuangmi.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: description: The IP address of your device. required: true type: string token: description: The API token of your device. required: true type: string name: description: The name of your device. required: false type: string default: Xiaomi Miio Switch model: description: The model of your device. required: false type: string {% endconfiguration %}