Automations disappeared, on current master drive and now on father drive

Hi,

would anyone know why automations in the UI would disappear? On Sunday evening, I found that my master drive had this issue, so thought, ok, will make use of the next most recent backup drive, and the automations were present. Went to bed last night, and, afaik no changes were made to the config, but this morning woke to find that no automations were firing.

What could cause this to happen?
Prior to swapping the drive, I attempted to create a new automation, and I went through the usual steps, and it looked like it saved ok. However on completion, even that wasn’t shown in the list of automations.

In my configuration.yaml file, I still have the lines:

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

automation: !include automations.yaml

Checking on the automations.yaml, that appears to have the config present, but they are not displaying, and not firing.

I’ll check on the log files shortly, but since my father backup drive is now suffering this issue, going to re-use my current master drive, as that had upgrades and more recent config applied.

Please help!!!

Do you have the SMB add-on installed? Can you copy All files from the /config directory to another PC without errors? Can you Open the files with a Editor from another PC via smb? Does the automation.yaml file Look OK in the Editor?

Hi,

thanks for responding, I have the file editor add-on installed, and the automations.yaml appears to be fine:

image

Hopefully someone has some ideas how to retrieve the automations so that they work once more

Rename automations.yaml automations.old
create a new, empty automations.yaml
restart HA
cut and paste one at a time an automation from automations.old to automations.yaml, and reload automations
if after reload you don’t see any automations any more, you have found the faulty automation that makes your automations to disappear.

1 Like

Thanks Francis, I was hoping this was going to be an option, but didn’t dare to just dive in and do it!

So, the strange thing is, I have 7500 lines of automation code, I copied the first couple in to the new automations.yaml file, and they saved file, and then appeared when I reviewed the automations in the UI. I got a bit gung ho with it, and put in 1000 lines at a time, and they were all good…

Then got the last couple of automations in the file, put these in 1 by 1.

Got to the end, and they all were fine! So not exactly sure what was causing the issue, as I didn’t change a single entry. Very bizarre!

Anyhow, thanks for the suggestion, looks like, for now, we’re good!