Xiaomi Smart Plug

Right at this moment I’ve got this

“Invalid config for [switch]: required key not provided @ data[‘platform’]. Got None. (See /config/configuration.yaml, line 21). Please check the docs at https://www.home-assistant.io/integrations/switch
9:34:04 AM – config.py (ERROR)”

.

and this is line 21, onwards.

switch:
-platform: xiaomi_miio
host: 192.168.0.119
token: ‘064a19d271f114ff5ef23dc2096ZZZZZZ’
model: chuangmi.plug.m1

Just so it makes sense. I have 4x Zigbee power plugs running off this.

and I have 1x ‘regular’ power plugs from wifi.
https://www.windsor.ph/data/shop/products_images/000156_4.jpg It’s almost identical, but no Zigbee

All 5 switches are in the Xiaomi application.

Here’s the issue, I added the Miio thing?? but it added as a GATEWAY, not a switch…?

(right…?)

The instructions are literally incorrect, so I’m pretty peeved!
I have been messing around and removed the erroneous “-” next to platform, it’s now in a better state.

switch:
platform: xiaomi_miio

NOT

switch:
- platform: xiaomi_miio

I am now up to the final step of being able to put the switch on my dashboard / lovelace? :frowning:
It looks like this.

but the zigbees look like this

But it’s spitting this error back at me.
This entity ("switch.xiaomi_miio_switch") does not have a unique ID, therefore its settings cannot be managed from the UI.

Hi,
delete “model: chuangmi.plug.m1” and restart HA server.

Hello,
I have installed the HA on the synology (Docker).
Everything works fine but I can’t add this type of switch.
I am also not really happy in changing the configuration.yaml file.
in the end, I tried changing, everything still works but the socket does not appear in the integrations.
Any sugestions?1

No problems here, just recording my experience in case it helps anyone.

I have some of the Zigbee plugs connected via the Conbee 2, but since the old wifi plugs are half the price on AliExpress, I thought I would try one.

I went through the registration process in the “Mi Home” app on my iPhone, and everything went well, except it didn’t show up in the room. I tried a few times with no success - it would only show my existing two devices (vacuum and air purifier). However, I don’t want to use the Mi Home app anyway.

After finding out my server country from here (sg), I used the HA integration to add it, and everything went smoothly.

As with the Zigbee version, the “international” three-pin plug requires an earth prong inserted to open up the other sockets. Therefore you cannot insert a two-pin plug. I jerry-rigged this by inserting a small piece of wood that had a loop of sellotape attached - this folds down when a two-pin plug is inserted, but allows me to pull the wood out if I need to insert a three-pin plug. I guess this makes me a bad person.