It’s possible to use template with entity_id in automation? like something of the following…
action:
- service: switch.turn_on
data:
entity_id: >-
'switch.myreef_relay_'{{ trigger.event.data.args }}
Obviously the config above will not work, but I needed something like this?
If it’s possible I don’t want to create a single Telegram command for every entity id, but I prefer to accodate a text to the telegram command like /switch_on *relaynumber*
The other problem is that the content of {{ trigger.event.data.args }} is ['sometext']
and not the simple string sometext … so how I can remove the unwanted [' ']
?