Identify which trigger and notify the name & value of trigger

Hello,
I want to receive a notification on my mobile whenever any of my 4 humidity sensors is above a certain value (let’s say 50%). This part is easy.

I want the notification to include which sensor triggered it and what is the humidity value of that particular sensor. This part I do not know how to do.

I can do this for each sensor, but I want to do a single automation for all 4.

I think I need a template that identifies the trigger for the automation and then puts it and its value in the notification, but I do not know how to do that.

Your help is appreciated.

You can just add 4 triggers with the same params in one automation, if one of them sets off, the notification can be sent

of course, but the notification needs to include the name of the trigger and its value - that is the part I do not know how to do.

{{ trigger.id }}

and

{{ trigger.to_state.state }}

If you actually want the name of the sensor and not the name of the trigger -

{{ trigger.to_state.name }}
1 Like

Thanks, that worked, I am now getting the name of the sensor in the notification.
I’m still looking for the template to get the actual value.

Like I said it’s:

{{ trigger.to_state.state }}
1 Like

right, thank you!

1 Like

Where do i put the {{ trigger.to_state.name }}

Thanks