Faecon
(Jo)
August 9, 2024, 9:30pm
1
this is a tap action on a mushroom template card.
tap_action:
action: call-service
service: script.audio
service_data:
station: states('input_text.' ~ user |lower ~ '_radiostations').split(',')[0] |default('') | title
room: "ruimte1"
when pressed I get " action script.audo not found" . What am I doing wrong ?
it looks like you’ve named the friendly name script.audio. what is the actual entity name? click on the 3 dots to the far right, choose show settings for that script then look at what it says… so for example, i just created a script that i named “script.test”. and this is what i get:
see how the friendly name is script.test… but the actual entity id is script.script_test?
i’m guessing your actual entity name is something like script.script_audio… but open up that property settings page and see…
also i thought that for the service data, it should be data:
, not service_data:
Faecon
(Jo)
August 10, 2024, 6:57am
4
I don’t think it has to do with the name of the script.
i think it would say “script not found”. Now it is “action not found”
This needs to be wrapped in "{{...}}"
.
station: "{{ states('input_text.' ~ user |lower ~ '_radiostations').split(',')[0] |default('') | title }}"
Faecon
(Jo)
August 11, 2024, 6:12am
6
it was strange, when I copied my code to a new script, it worked. no need to be wrapped…
strange. thanks anyway