Xiaomi Smart WiFi Socket turns off when HA is restarted

Every time when I restart the HA config, my Xiaomi Smart WiFi Socket turns off. Is there a way to prevent that? I don’t understand why it would even do that??

Also I can’t seem to figure out how to give it a custom name in the UI that differs from the entity name I define in my configuration.yaml:

  • platform: xiaomi_miio
    name: livingroom_amplifier
    host: 192.168.1.xx
    token: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    model: chuangmi.plug.m1

Mine don’t do that… are yours still connecting to the Xiaomi servers or have you blocked that? (mine still connect) Do you have an automation that could be doing this?

Ah you’re right. It WAS my automation that did that.

I have an automation trigger when my media_player (chromecast) go “off” or “unavailable”, it should turn_off my switch, which is very convenient. I can see why home assistant would believe it went off, when it is restarted.

I just added an “for: minutes: 1”, which seems to fix it.

THANKS!

1 Like