Notify when sensor is above 25 below zero

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:

trigger:
  platform: numeric_state
  entity_id: sensor.freezertemp
  above: -25.0
action:
  service: notify.pushbullet
  data:
    title: 'Freezer failure: {{ sensor.freezertemp }}'

It works perfectly when I try the config with temperatures warmer than zero degrees, but that is kinda useless for freezers. :slight_smile:

Anyone got any ideas for this kind of trigger?

EDIT:
I forgot to mention that it fails during HA service startup with message:
Value cannot be processed as a number: unknown

Is it just an issue with any negative numbers?
Could try https://home-assistant.io/components/binary_sensor.threshold/ although I haven’t been able to get it to work

Hi.
it works with positive numbers on other temperature sensors.
It’s only when it is a negative number that it won’t work.

I’m not trying to hijack this thread, I hope you got it figured out.

I was just wondering what kind of temp sensor are you using in your freezer?

1 Like

Hi.
I’m using a simple Nexa temperature sensor made for Tellstick, 433 MHz
:blush:

in case you did not already solve this, try with a template trigger. That should work fine afaik.

trigger:
   platform: template
   value_template: "{% if states.sensor.freezertemp.state > -25 %}true{% endif %}"
action:
  service: notify.pushbullet
  data:
    title: 'Freezer failure: {{ sensor.freezertemp }}'

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"