Format for service dev-tool

Ive obviously got the syntax wrong, Ive search but can’t work it out.

I need the some data values in an email.

Im using the services tool to test it with the Service as :

notify.e_mail_temperature_states

and the JSON data set as :

{"message": "state_attr('sensor.temperature_data_lounge', 'min_value') "}

And all I’m getting is a email with text:

state_attr(‘sensor.temperature_data_lounge’, ‘min_value’)

in it which is understandable from the above code.

any help would be great.

I’m not 100% sure you can template there but try:

{"message": "{{ state_attr('sensor.temperature_data_lounge', 'min_value') }}"}

1 Like

Spot on Tom, thank you so much.

1 Like