In trying to create a script I appear to have got myself into a bit of a hole with 2 problems:
I have a script that is saying “Only scripts inside scripts.yaml are editable.”
I deleted the script in scripts.yaml but it is still appearing in the UI.
If also have a script where I deleted it, but if I try to recreate it with the same name it appears in scripts.yaml but not in the UI.
If I delete the script from scripts.yaml and try to recreate it in the UI with the same entity id I get “You can’t save this script because the ID is not unique, pick another ID or leave it blank to automatically generate one.”
I have tried reloading scripts and restarting - I cannot delete one of them and I cannot get the other to appear.
Yes, I did stumble onto a solution. Unfortunately I thought I’d posted an answer somewhere else where I’d asked the question (like reddit) at the time but I can’t find it so I’m now a little hazy on how exactly I did it.
As I remember, I managed to find the script with the conflicting ID and renamed it something else ‘offending_script_2’, I then re-created the removed script in scripts.yaml with the - i.e.
offending_script:
alias: Offending Script
sequence:
- delay: ''
mode: single
This gave me back the ability to edit it in the UI and delete one of them.