#how can i make a trigger from above 90 towards 0?

21 messages · Page 1 of 1 (latest)

subtle karma
#

So not triggering when a entity is simply 0, but going from abive 90 to suddenly 0. Is this possible?

Edit: this means that values below 91 going to 0 are not triggering the automation.

analog imp
#

One NOT condition with 2 state conditions: NOT state == 0 AND NOT state == 90.

subtle karma
#

?

analog imp
#

Ohhhhh... wait. So, you want to trigger when the sensor goes from 90 to 0?

#

But only that condition, right?

brave tundra
#

Trigger on numeric state change to 0
Condition filter trigger.from_state.state > 90 so anything less than that won't fire the actions

subtle karma
#

If it triggers going to 0 but condition says it has to be above 90 it will never fire actions?

#

It cant go to 0 and be above 90 at the same time

#

I suppose i could make 10 trigers. Going from 90 to 0. 91 to 0. Etc...

#

But that seems silly

brave tundra
#

when in an automation you can check the trigger.from_state.state to get the value before it changed

#

trigger.to_state gives the new value

#

So this would be: Trigger If 0, ignore unless used to be > 90

subtle karma
#

With yaml?

brave tundra
#

template filter

#
  - platform: state
    entity_id:
      - sensor.attic_temperature_temperature
    to: "0"
condition:
  - condition: template
    value_template: "{{ trigger.from_state.state | float(0) > 90 }}"```
#

something like that

subtle karma
#

Thanks so in the condition field after all

brave tundra
#

idk if you'd prefer a state change to 0, or a numeric state change to < 0.01, the latter would probably be more reliable but the former is more clear when explaining

brave tundra