Xiaomi Smart WiFi Socket and Smart Power Strip

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
  - platform: xiaomi_miio
    name: Original Xiaomi Mi Smart WiFi Socket
    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.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 Variables


(string)(Required)The IP address of your device.


(string)(Required)The API token of your device.


(string)(Optional)The name of your device.

Default value: Xiaomi Miio Switch


(string)(Optional)The model of your device.