I am trying to use this automation with telegram bot:
- alias: Telegram - Livingroom lights toggle
initial_state: true
trigger:
platform: event
event_type: telegram_command
event_data:
command: /lights
action:
- service: light.toggle
entity_id: light.salotto
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.user_id }}'
message: Le luci del Salotto sono {{ states('light.salotto') }}.
id: 47a8cbb3cf194b6983952fb7355bbf7f
But i always get this error:
Error rendering data template: UndefinedError: 'dict object' has no attribute 'event'
I tried to find something which can help me to trace this but unsuccesfully…
Any hints from you experts?