I actually did it before reading your comment, the way you mentioned!
For anyone interested, I solved it via ONE script (for all), and expanding the data in the triggers.
First, the automation you want to build. Especially important the triggers info: id, event:data and command within. It’s a bit more than the simple use of triggers.
alias: Comedor y TV
trigger:
- platform: event
event_type: command
id: comedor
event_data:
command: comedor
- platform: event
event_type: command
id: tele
event_data:
command: tele
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: tele
sequence:
- scene: scene.tele
- conditions:
- condition: trigger
id: comedor
sequence:
- scene: scene.comedor_2
default:
- scene: scene.comedor_2
- scene: scene.comedor
- service: script.tado_home
data: {}
mode: single
Second, the button calling the script with the data.
type: button
tap_action:
action: call-service
service: script.convert_to_event
service_data:
command: 'comedor'
You can re-use the tap_action part to any button, double_tap_action or hold_action!
And finally, the script to convert commands into events. Very simple:
alias: Convert to event
sequence:
- event: command
event_data:
command: '{{ command }}'
mode: single
The event is command, and it contains event_data with command: and the actual command to be passed (from the button in step 3, to the automation in step 1).
Let me know if there’s a simpler way to do this!