Hi all
Newbie here looking for a hand with triggering automation.
Have been using HA for about a year and loving it, primary reason for regulating the nursery room environment during the cold winters.
Would like to expand on my current automations, to control my heater:
- id: heatoff
alias: heater off when above 22.8C
trigger:
- above: '22.8'
entity_id: sensor.room_temperature
platform: numeric_state
- above: '23.2'
entity_id: sensor.room_temperature
platform: numeric_state
condition: []
action:
- data:
entity_id: switch.heaterplug
service: switch.turn_off
- delay:
minutes: 2
- data:
entity_id: switch.heaterplug
service: switch.turn_off
- delay:
minutes: 1
- data:
entity_id: switch.heaterplug
service: switch.turn_off
I have essentially the same for heateron automation.
The reason for redundant triggers/actions was because the wifi smart plug i was using kept dropping off the network, ive since fixed it at the wifi controller, turned out to be a setting, but still dont trust it yet.
Would like to add input_number option in lovelace to specify the temperature trigger, and also create another trigger at +/- 0.4c of the same input_number as the backup trigger.
So far i have:
(in configuration.yaml)
Input_number:
heater_max:
name: heater_max
initial: '22.8'
min: '20'
max: '25'
step: '0.1'
mode: box
I did have a play around and got a working trigger template similar to something like this(apologies, lost the actual code, might be missing a " | int" somewhere too ):
- id: heatermax
alias: heater_max
trigger:
- platform: template
value_template: '{{ state('sensor.room_temperature') > 'state.input_number.heater_max.state' }}'
was looking to duplicate the trigger adding in a second entry:
- platform: template
value_template: '{{ state('sensor.room_temperature') > 'state.input_number.heater_max.state' | int + 0.4 }}'
but the results i was getting out of the template editor wasnt calcuating the +/- operator, instead only gauging the greater/less than only.
Cheers,
Jinneth.