automation_27 is the underlying name, this happens when you don’t name it something when you first create it/save it. It will auto generate a name like automation_<number>. You probably named something that better describes it afterwards. To find out the name you are seeing in the UI, go to developer tools, and search automation.automation_27. A object should should appear. Look at it’s attributes. The name you see in the UI is the friendly name attribute.
About the error, this is because you are trying to run an automation that is already running.
Maybe there is a rogue one left some where? I am not that familiar with YAM automations as I use the UI. Maybe it is named something else and therefor it is not obvious what automation it is?
If that is a restored version you might be able to delete it from the Configuration / Entities list. You may have to turn the filters off (top right) to see it.
I’m not 100% sure why it is used but it stores deleted entities.
E.g. if I delete one of my YAML automations that has an id I have to restart then go to the unfiltered Configuration / Entities list and find the deleted automation there and remove it as well.
I’ve been through all my automations and added an id to every one that didn’t have one. I’m not sure why I thought that might help but suffice to say it didn’t.
I then tried to add an id to automation_27 in core.restore_state but after a restart the id had been removed and I was back where I started.
It is a bit troubling that I have an automation that I can’t identify that is clearly being triggered (more than once1) and which I have no control over and have no idea what it is doing. I’m not suggesting this is anything nefarious but it does raise some questions.
At the very least about my ability to control my own config.
I actually think this is quite a serious question.
I have no idea where to raise it so that someone will listen (and quite possibly give a perfectly reasonable answer).
1 It may just be as you say a corruption and automation_27 is somehow a duplicate of an existing automation which would render it annoying but benign. However, what if I change the original to not be a mode of single?
Or worse still I change it to have different functionality, or remove it completely. It would still run under the guise of automation_27.
After what tom_l said I decided to look for some less nuclear options.
And then I realised that actually this might be an issue with quite serious implications (it might not but…) so I posted the above.
After posting above I went for what francisp suggested.