Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem using variable in trigger. #49

Open
joseecm-github opened this issue Nov 9, 2020 · 1 comment
Open

Problem using variable in trigger. #49

joseecm-github opened this issue Nov 9, 2020 · 1 comment

Comments

@joseecm-github
Copy link

joseecm-github commented Nov 9, 2020

Hello!

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 call_service at pos 2: Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'

What am I doing wrong?

@joseecm-github
Copy link
Author

Sorry, the problem was not about the using of variable in trigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant