Hellou everyone,
i know this topic is already posted different times here but searched alot i havent found any solution for my problem
Maybe someone have a clue
I have an automation which should trigger when a numeric sensor value changes from prev value. Numeric State Trigger wont work due to above/below triggers only when the value is inbetween. I decided to go with a template based trigger and compare the value to a previously saved numeric value.
Maybe someone have an Idea or a clue,
I have already a few “workarounds” which i can implement but want to know what i have done wrong
Thanks in advance for hints/ideas
alias: new automation
description: ""
trigger:
- platform: template
value_template: >-
{{ states('sensor.numeric_value') !=
states('input_number.last_value') }}
enabled: true
action:
- service: notify.someone
metadata: {}
data:
message: "{{states.sensor.numeric_value}}"
enabled: true
- service: input_number.set_value
target:
entity_id: input_number.last_value
data:
value: "{{states('sensor.numeric_value')}}"
enabled: false
mode: single