Hi!
I find that I often use the same sequence of actions in automations. For example, I often use TTS to speak notifications on my Google Home speaker. For this, I need to add several different actions as a sequence and specify different options like this:
- sequence:
- action: media_player.turn_on
target:
entity_id: media_player.kok
- action: media_player.volume_set
target:
entity_id: media_player.kok
data:
volume_level: 0.75
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: tts.speak
data:
media_player_entity_id: media_player.kok
cache: false
message: "Fel pĂĄ robotdammsugaren."
options:
voice: Achernar
It’s easy to copy this yaml and reuse it for other automations BUT if I later want to change for example the voice: option I need to manually change in all automations.
Is it somehow possible in HA to add these actions to a separate yaml-file or something and use this in automations? I would preferable want to be able to change some options like message: for each automation.
That way I could easily change all automations using these actions at the same time. I do this using groups for entities (it’s easier changing a group than changing all automations) but I haven’t thought about doing it for automations.
Is it possible? If yes, how?