I have been using Hass.io for about a year now and have enjoyed it very much. Recently a few things I’ve wanted to do have led me to a migration from hass.io to hassbian. Everything seemed to go smoothly but my Xiaomi sensors are now not playing ball…
I have many automations but I’ll only show a couple. Here are flip automations for the cube, which worked fine before:
- id: '1598948264594'
alias: Cube - Flip90 Toggle
- id: '1545563854594'
alias: Cube - Flip180 Toggle
So these automations can be triggered manually and they perform as expected.
Then bizzarely the cube is still displaying the live actions in HA.
There are also multiple listeners for cube_event… so at this point I am stuck! Any ideas?
I would look carefully, maybe the cube name changed or something subtle like that messing the automatons.
thanks for the tip. I have looked carefully with fresh eyes and still cannot see the issue. No names have changed either the entity_ids remain the same after checking. Other automatons based on time and sun are also working, I can see the clicks of all my aqara switches and buttons yet few of them work.
Real let down may have to move back to Hassio
are the automations enabled?
They are all enabled, just xiaomi switches not working. No logs are shown and other automations work!
Yaml is strange sometimes, one character can break it
issue might be “-” character in “alias” or capital letter, try putting alias in quotes or renaming it to small letters only and without characters, try these:
alias: 'Cube - Flip180 Toggle'
alias: 'cube flip180 toggle'
alias: cube flip180 toggle
Thanks for the suggestion, I will try these tonight but as I have other automations with no dashes that also don’t trigger, I feel this isn’t the issue. Eg “Bathroom Toggle”. But I will also try without spaces and see if it makes a difference!
For anyone else with this issue I have solved it. by changing:
With this solved i’m sure the other xiaomi switches will be the same (click would be xiaomi_aqara.click)
Thanks for the input guys
I think the problem was actually technically solved by @Sir_Goodenough in post #2.
If you haven’t solved this yet, I think I ran into it and fixed it. HA 0.84 made some changes. One of them appears to have not made the docs, but automation’s no longer default to on. They default to off if they cannot remember what state they were in before an HA reboot. There was a mention in the update notes of 0.84 that said if you don’t set an initial state of your automation to ‘on’, then they will be off after the 0.84 update. The automation doc still says they default to on, but in actuality they no longer do. Set initial state in your automation’s and that takes care of the problem. It most often shows after consecutive rapid reboots, like when you are fixing a sensor and have to restart it a couple times in a row to get it right. Probably should be written up as a bug but I don’t know if anyone has.
- id: TTS-flush-cache
alias: Flush TTS Cache