Hello everybody!
I cannot figure out how to combine templates in a from to to trigger automation.
I want to start charging my waterheater based on an inputnumber (batt_input_number_start_autoladen) and when my solar battery (sensor.batterij_lading_int) reaches this charge, it switches a high voltage switch.
This works fine:
trigger:
- platform: template
value_template: >-
{{ states('sensor.batterij_lading_int') | int(0) ==
states('input_number.batt_input_number_start_autoladen') | int(0) }}
BUT my problem is that I only want to trigger the automation when value is reached by ascending not by descending.
For example: my input number is 95 at the moment. Battery starts charging and when the charge changes from 94 to 95 automations starts.
Another automations shuts of the high voltage switch when water is heated.
So for example battery is still at 100%, water is heated. Night comes and battery discharges. When it changes from 96% to 95% the automation (obviously) is triggered again. And this is what I do NOT want.
Any ideas on how to do this?
P.S.: I could ofcourse use a boolean for this as an extra condition, but that feels a bit … you know
1 post - 1 participant