I’m moving over some of my automations to Home Assistant (previously running them in HomeKit) but I’m finding trying to use the Automation editor from the frontend (web UI) is really buggy, or I’m completely missing something.
When I create/modify an automation from the frontend, is it not writing to the automations.yaml file? If it’s suppose to, it’s definitely not, or I’m not seeing it. The very first automation I created seem to work fine and I could see it in the automations.yaml file. Trying to modify it or create new ones, I’m not seeing them in the automations.yaml file anymore and the automations don’t work (which lead me to believe they probably don’t even exist). However, the automation section in the frontend shows them and I can modify them as well.
Nothing in the logs related to the automations (just some other known stuff).
It’s strange because when I save an automation from the automation editor, the “Modified” date hasn’t changed but when I open the file, I can see it’s written to the file but they are blank lines. If I delete the blank lines, save and reload the automations, they disappear from the automation editor.
So it appears something is being written, but in a format that shows up as blank lines. I’ve never seen this before and I’m using Atom to open the automations.yaml. Very strange.
So I completely restarted my RPi3, and the automations.yaml file now looks “better” (not sure if it’s 100% correct). At least the automations I created in the editor are now showing up. This is what it looks like:
Well, for anyone that cares in the future, using the Automations Editor can be confusing when trying to setup a condition with the sun.
If you set a condition and select Before Sunrise and After Sunset, one would think that applies from between sunset and sunrise. Apparently that’s not the case and your automation won’t run, even though when you select the Sun condition type it gives you both the Before and After options so it seems like it should.
The only way I know to get this to work from the editor is having to create two automations. One that is after sunset which will last until midnight and another that is before sunrise that will start after midnight. Not the most intuitive and something probably worth changing in my opinion for ease of use. The quickest solution would probably be adding the ability to specify an or condition from the editor.
Yeah, it’s definitely buggy. I think the best bet is trying to find a repeatable way to reproduce the issue and submit a bug report. The reason it probably never gets fixed is because people try to use it, get frustrated and just end up manually editing the automations.yaml file.
I personally don’t use it because you still have to type. If i wanted to type into small UI boxes I wouldn’t use home assistant. The automation wizard needs to be moved towards a ui chip system. Where the triggers, conditions, and actions are all stored in a collection and you just drag the item into your automation. From there you populate the necessary information but you still don’t have to really type. The fact that we still have to type the entity_id on top of most other information is a turn off. It’s much easier to do that type of work in a text editor, not this UI with 10 million text boxes.