Automation disappeared from home assistant

Hi guys,
I have a weird problem. Out of nowhere the automations I had created disappeared from the automations tab in the web interface. I had not yet done any advanced configuration, only configurations in the web interface. I didn’t think much of it at that moment and thought they would probably come back at a restart, so I continued with my configurations.

I ended up adding some lightgroups to configuration.yaml. After this change I had to restart HA, so I did. But after the restart the automation tab in the web interface was not there anymore and the next error messages came up in the logs:
afbeelding

To make sure it was not any of my changes that caused this I changed the configuration.yaml back to what it originally was:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

But unfortunately the error was still there.

When I open ‘automations.yaml’ the automations I created are still in there. They also appear in the Entity tab on the web interface with the next icon under ‘status’:
afbeelding When I hover my mouse over it, it says ‘Hersteld’(‘Restored’ in english). That does not make any sence to me, because its not working.

So I think they are not being called correctly for some reason, but just started with home assist and couldn’t figure it out. I have also tried searching for a solution but didn’t find anything, so I’m hoping to find one for this specific problem thru the community.

This is the full error log:

It looks like you could have an errant double quote " somewhere in your config.

That might have been it. I cleared my automation file and the error was gone. So I started building it up 1 automation at a time and I found the one with the problem, so after deleting this one my automations where working again.

Always run a configuration check before restarting/reloading and fix any reported issues.

Thanks for the tip, I will do that from now on

1 Like

It seems I ran in a similar issue. And I also have still to find my way inside HA. Where can I find my (that mentioned) automation file?
I have installed visual studio code. Assuming I will need it for that. But haven’t used it yet.
Can you point me to the right direction?

I just figured I can open VS code on my phone. And it is already pointing at the right folder.
I have to wait when I’m back home. Working with Vs code on my phone is awkward

Anyone worked out what’s going on here? I’ve had exactly the same problem - every automation disappears after I reboot. I kind of suspect it’s after an update of some kind, e.g. last night HACS, but I’m not entirely sure. I’m not really very tech, so please be gentle… I’ve located both the config and automations files and they are both ‘normal’ but as above, I suspect, that there is something in them which HA is objecting to (quite badly). Any clues… It’s a pain doing a restore, and losing loads of stuff that I’ve been working on each time this happens, so I’m keen to reach the root cause.

Rename automations.yaml to automations.yaml
create an empty automations.yaml

restart HA

copy one automation at a time from automations.old to automations.yaml

Thanks Francis… spot on… The blank automation file was a nice re-assurance that it wasn’t anything else, e.g. the config file or any add-ons causing the problem. I then took the 8000 (!) lines of automations and divided into two roughly 4000 lines and tried each of these - would it boot successfully. After a while of cutting and pasting and rebooting, I discovered that it was some rogue devices - Zigbee - which were causing the problem so I was able to search for these and remove the automations. I still have the original file, so once I’ve recovered my sleep I can slowly and carefully reintroduce the missing automations. Well done and thank you for your intervention; your a star.