Restoring deleted automation files

I did a very stupid thing by deleting some of my automations stored in YAML files.
The thing is, I haven’t restarted home assistant yet and the automations are still up and running.

Is there any reasonable way to restore these automations?

Were they defined via the UI or YAML? If the UI, you may still be able to edit the automations and save them to repopulate them.

Do they have a recent run trace? The run trace page has a “Automation Config” tab that contains the automation.

Have you created any recent backups that may have them?

Thanks for your reply,

All automations were created in YAML and unfortunately I had no recent backup to use.

Did this work for you?

1 Like

It worked for me! :grin: Thanks!! :revolving_hearts: