Hi all.
I have a problem that I can’t seem to figure out on my own.
I have a sensor that measures the temperature in a freezer. I want HA to notify me when the freezer is warmer than 25 degrees celsius.
I have tried with a trigger like this:
I struggled with this, and thanks to WalterWampe I managed to fix this.
I just had to make a small change and added | int before value.
I am using SMTP for notification so states must be before sensor name and state at the end.
Thanks
- id: freezer_temp_notification
alias: 'Freezer Notification'
trigger:
platform: template
value_template: "{% if states.sensor.freezer_temp.state | int > -25 %}true{% endif %}"
action:
service: notify.smtp
data:
title: 'Freezer failure: {{ states.sensor.freezer_temp.state }}'
message: "Check the freezer, currently {{ states.sensor.freezer_temp.state }} C"