Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 102651

Get information about device that triggered automation

$
0
0

@FlorinAcsinte wrote:

Hi.
I have 5 mijia door sensors (zigbee2mqtt) monitoring all of my windows. I created an automation that sends a notification via telegram whenever one of them opens.
Currently, it just prints out the state of all of the windows.
I am now trying to make it so that it only sends the name of the device that triggered it, but i can’t get this to work. Searched the internet and found several posts about the same issue. But each time when i try using their solution, it doesn’t work. Guessing the syntax might have changed in the meantime.

closest i got was using

data:
  message: {{trigger.from_state.attributes.friendly_name}}
service: telegram_bot.send_message

that got me an error, but it did show a device id in the error logs… no idea how to get it normally though…

Can anyone tell me how i am supposed to get the info?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 102651

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>