The sky’s the limit on what you can do with Home Assistant. I’m just going to offer some basic automation examples in this tutorial. Here’s an example of how I use control the mood lighting in my room, using Home Assistant to control XiaoMi powerplug, XiaoMi Smart switch and XiaoMi Yeelight.
It’s a crappy video, but hope you get the idea.
How To Create A New Automation
Automation examples in this tutorial are created from the Automation editor from the Hass Web Application. You can access the web application via Configuration → Automation as shown below:
Once in Automation editor, click the + icon on the bottom right to create a new Automation.
You’d need to know the name of the Zigbee devices you want to control. You can find this in the developer tools section of Home Assistant (lower left). Click the icon marked below to access the list:
Locate the entity_id under the Entity column for the device you want to control - you will need this information when creating your Automation information.
|Original XiaoMi Mi Smart WiFi Remote Control Multi-functional Gateway Upgrade||sensor.illumination_xxxx|
|Original XiaoMi Smart Wireless Switch||binary_sensor.switch_xxxx|
|Original XiaoMi Mi Smart Temperature and Humidity Sensor||sensor.temperature_xxxx|
|Original XiaoMi Mi Smart WiFi Socket - ZigBee Version||switch.plug_xxxx|
Now you have all the basics out of the way. Let’s create some simple Automations.
A Word From Our Sponsors
Comment from: Diogo Visitor
in point 5, with version 2.66.2, I needed to press 5 times, or more, not in the blank area above the version, at the bottom of the screen
Thanks. Have updated the article.
Comment from: Juan Visitor
I dont understand step 2. How can i do this step?
Hi Juan, which step 2 are you referring to? Can you tell me the page # of the article you’re having problems with?
Comment from: MALCOLM Visitor
Hi I cant find the password field in the latest version of the gateway 3.3.10_117 there is now a security PIN password General Settings > Security. Is this the same value??
Mac address and IP details can now also be viewed in a different menu General Settings > Network Info
No. The process has changed slightly, but it’s the same logic.
- Go into the Mi Home App
- Go into Xiaomi Gateway
- Tap on the … at the top right corner
- Tap "About"
- At the bottom, you should see "Plug-in versin: xxx.xxx.xx"
- Tap that repeatedly and two more options will pop up
- Type "Wireless communication protocol"
- Turn "Wireless communication protocol" on
- That password you see below is your API key (Everything after "Passwrd:"