While making a minor edit to an automation and saving and closing the automation, all automations disappeared. The automations.yaml file is intact and I have made a copy to be on the safe side. Restarting HA had no effect. The configuration.yaml file has the required automation line:
Yes, the problem was in the configuration.yaml file. Despite this it passed the configuration valid test. I had added a variable to the config file just before editing the aforementioned automation.
I was able to use an older backup configuration and despite there being some more recent changes, it did bring everything back to normal. There were a lot of other things missing as well, i.e. many menu bar items were missing, the links to load various subsections of the config on the Developer Tools/ YAML page were missing. It is almost as though the bulk of integrations defined in the configuration.yaml were not read in.
In the end, I opened the ‘bad’ configuration file in VSC on my laptop and other than making a couple changes to readability, everything was as it should be. After saving out of VSC I was able to use the original configuration file.
Problem solved but still a mystery.
You need to look at the log as well after running this test. Errors are reported there even thought the test says your config is valid (it’s a known issue).
Very likey all you had to do was fix the addition you made.
There was nothing in the log but the usual complaints concerning a couple integrations. Interestingly enough, I went back into the configuration.yaml file today to reinstall the variable from the previous disaster. Lo and behold, the same problem. Now I am thinking that there is something that HA does not like about this particular variable which made no sense at all. Once again I restored the backup config that I made after recovering from the original fiasco and all was well. I took another look at the entry I had made and found the culprit, a missing close quote. I am not sure why the ‘Validation’ routine did not catch this as my previous experience was that seemingly much more minor mistakes completely blow up the ‘Validation’ routine. Not sure if something has changed in the validator since the last update but it certainly is not checking everything, particularly things that cause really serious problems like this. I still have no idea what the original problem was. The only thing I did was to open the configuration.yaml file in VSC and save it (as far as I know).