I wanted a script that would flash the lights in the living room when it’s time for my daughter to get ready for bed. But I tested it in my office first where I happened to be sitting. So initially I used the UI to write a script which I named “Flash Office Lights” and a got an entity called script.flash_office_lights. Once I had the script working to my satisfaction, I renamed the script in the UI to “Flash Livingroom Lights”… then I went to add the script into an automation… but when I went to reference the script, via a Call Service action, it was still called script.flash_office_lights.
The only way to fix this is to go and edit the scripts.yaml file to change the entity ID.
So I’d like to be able to either edit the entity ID directly in the UI and/or see it in the UI and have it kept in sync when I edit the (friendly) name.
Ran into this issue today and it was extremely frustrating. I kept renaming the script in the UI and could not get it to work via Google Home Voice commands. Changing the name in the UI never changed it in the YAML file.
I had a dirty trailing _2 on my script name : close_downstairs_blinds_2 that I couldn’t see/change via the UI (I could see it when using it in automations though)
I found that _2 in scripts.yaml but when I deleted it there and saved the file, the script wouldn’t load anymore in the UI
The trick was : after updating/saving the scripts.yaml, you have to reload SCRIPTS in your Server Controls page (/config/server_control) and