I am trying to use a variable in an automation trigger. This is my automation:
- alias: 'Envio de videos de la terraza por Telegram'
trigger:
platform: state
entity_id: variable.incoming_terraza_video
to: 'true'
action:
- service: telegram_bot.send_video
data_template:
file: "{{ trigger.event.data.path }}"
caption: "{{now().strftime('%d/%m/%Y %H:%M')}}"
- service: variable.set_variable
data:
variable: variable.incoming_terraza_video
value: 'false'
But I am getting the following error:
_Envio de videos de la terraza por Telegram: Error executing script. Unexpected error for callservice at pos 2: Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'
Hello!
I am trying to use a variable in an automation trigger. This is my automation:
But I am getting the following error:
_Envio de videos de la terraza por Telegram: Error executing script. Unexpected error for callservice at pos 2: Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'
What am I doing wrong?