Hello,
I’ve been using HA now for quite some time with basic functionalities. I have now started to build more sophisticated dashboards using Mushroom cards.
Plan is to merge windows and cover information into the same cover card.
The colors around the cover icon shall indicate the window state (closed, tilted, open). Now some windows have handles that can be electronically locked. My idea is to use double or long tap to toggle the window locks and display the state with an additional badge. As there is no lock.toggle service, I wanted to call a script from within the card yaml to toggle the lock, passing the entity id through a variable.
This is where the trouble starts. I can’t set up the respective script. Whatever I do, I get the dreadful extra keys not allowed @ data[script] error. So I steadily lowered the level, used the example from the docs and even extremely primitive test versions like
script:
toggle_windows_lock:
alias: Toggle Windows Lock
sequence:
alias: Turn on ceiling light
action: light.turn_on
target:
entity_id: light.buro_decke
But whatever I do, I get this error message whenever I try to save the script. I am getting a little bit frustrated over this, especially because neither the docs example nor anything that ChatGPT would provide a working solution.
I will be grateful for every hint to point me into the right direction. ![]()
Thx Johannes


