Can someone redirect me to how to show one or more attributes of a sensor in a notification created by an automation?
I’d like to see some values of a sensor’s attributes in a notification.
Sorry for my english but i hope i was enough clear…
data:
message: "This is a message with this attribute value, {{ state_attr('sensor.some_sensor', 'some_attribute') }} followed by more text."
3 Likes
Thanks as always, but if i want to show more than one attribute? Can i simply add attributes to the same line ?
Like this;
data:
message: "This is a message with this attribute value, {{ state_attr('sensor.some_sensor', 'some_attribute') }} followed by more text, then another attribute value {{ state_attr('sensor.some_sensor', 'some_other_attribute') }}"
4 Likes
Ok thanks…, i’ll try.
Just found this older thread and it helped me solve a similar problem. Thank you!
1 Like