Help with Numeric_State and Below

I’m trying to create a automation that will notify me when the tempurature for my fridge goes below a target tempurature.
Its an LG Fridge, which from its integration pulls in the target tempurature (IE programmed at the fridge itself from front panel or their preprietary app) as climate.refrigerator_fridge, and then shows the current temp temp as sensor.refrigerator_fridge_temp.
I have seen examples of how to have a trigger where you type the temp in manually into the automation, but I want it to pick this up from the entity from the fridge, that way its all dynamic. If I change it from the fridge, thats the new target.

So far I think the trigger should be this:

  - platform: numeric_state
      - sensor.refrigerator_fridge_temp
    below: climate.refrigerator_fridge

But it gives me a an error:
Message malformed: expected float for dictionary value @ data[‘below’]

Any ideas?
I tried playing with stuff like replacing the below entry with:

below: {{ states(‘climate.refrigerator_fridge’)|float}}

but its not working, as I’m not sure quite how the float syntax needs to be… or if I’m even on the right track.

The above and below options of a Numeric State Trigger do not support templates or the entity_id of anything other than the following (i.e. not a climate entity).

You can make a Template Sensor that reports the desired temperature value and then use its entity_id for below.

Alternately, you can use a Template Trigger instead of a Numeric State Trigger.


Be advised that the state value of a climate entity is not temperature. In other words, this will return the current operating mode, not temperature:

{{ states(‘climate.refrigerator_fridge’) }}

Temperature is an attribute of climate so you need to use state_attr().

1 Like