Hi, I need an automation which is triggered each time the temperature changed and then checked if the temperature is below some level. (Application is automatic window lifter, close the window when the room temperate in the room is too low)
I tried with numeric_state but this triggered only when it crossed the level. But unfortunately, in my case it could be that it is already below this level, hence it does not trigger.
I need a trigger that checked always the temperature when it drops, not just when it crossed the level. Any suggestion?
As mentioned, I used already numeric_state and Entity
Use a State trigger with a blank to value. This will cause the trigger to fire on every state change.
Then add a Numeric State condition to check that the value is below your threshold.
triggers:
- alias: Fire on every Temperature change
trigger: state
entity_id:
- sensor.keller_hinten_1_temperatur
to:
conditions:
- condition: numeric_state
entity_id:
- sensor.keller_hinten_1_temperatur
below: 18
You can add a Template condition if you also want to ignore rising temperatures.
Use a threshold sensor to track whether the temperature is below or above 18 deg (set lower limit to 18) and create an automation to close the window, if it is open, when the threshold sensor state changes from off to on