Not getting event triggering telegram message

Hi, not getting this working.
With persistant notification this works in HA app. Where am I doing wrong?
Im trying to change the persistent notification to telegram.
Tried to figure out but now im stuck and dont find any solution by searching.

Telegram can be triggered manully from developer tools, services. So I know telegram connection also works.

Any ideas?
Real name replaced by MY_NAME
and telegrambots real id replaced by TELEGRAMBOT.

- id: '1615238942045'
  alias: MY_NAME hemma (telegram)
  description: Meddela telefon när MY_NAME ses
  trigger:
  - event_type: netatmo_event
    platform: event
    event_data:
      type: person
  condition:
  - condition: template
    value_template: '{{ trigger.event.data[''data''][''name''] == ''MY_NAME'' }}'
  action:
  - service: notify.TELEGRAMBOT
    data_template:
      message: '{{ trigger.event.data["data"]["name"] }} at {{ trigger.event.data["data"]["home_name"]
        }}

Lowercase letters, not capitals.

Sorry, I was unclear. That is only as an example instead of the real names. Real ones are lowercase.

Try this:

action:
  - service: notify.TELEGRAMBOT
    data:
      message: '{{ trigger.event.data["data"]["name"] }} at {{ trigger.event.data["data"]["home_name"]}}'
2 Likes

Your message template is missing the closing '

2 Likes

Thanks! This solved it!

1 Like