Struggling a bit converting a Node Red automation for my geyser.
The behaviour I want is :
Is this hysteresis type behaviour possible with automations? The code below is as far as I've got at the moment. I have a helper which evaluates the schedule and outputs on or off
The behaviour I want is :
- Evaluate the time for the windows where I want the geyser to operate
- Check the temperature. If <50 then turn geyser on. If >55 turn geyser off
- BUT - If between the range of 55 and 50 it must kepp the geyser on if the range is entered from below. If the range is entered from above... i.e the temp dropping from above 55 then it must only turn on again when temp drops below 50.
Is this hysteresis type behaviour possible with automations? The code below is as far as I've got at the moment. I have a helper which evaluates the schedule and outputs on or off
YAML:
mode: single
trigger:
- platform: template
value_template: "{{ states('schedule.geyser_windows') == 'on' }}"
for:
hours: 0
minutes: 1
seconds: 0
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: switch.sonoff_******
below: 50.1
sequence:
- service: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.<gesyerswitch>
- conditions:
- condition: numeric_state
entity_id: switch.sonoff_******
above: 50
below: 55.1
sequence:
- if:
- condition: state
entity_id: ""
state: ""
then:
- type: turn_on
entity_id: *********
domain: switch
- conditions:
- condition: numeric_state
entity_id: switch.sonoff_*******
above: 55
sequence:
- service: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.sonoff.******