hi, i’m pretty new at configuring yaml,
this code is working, but to switch the fan on at 73 and off below 72, do i really need 2 automations? i wish i could make this happen with just 1 action, it would be so much cleaner.
i read a few topics allready, but couldnt make sense out of it,
i hope someone can help me with this pickle?
id: ‘xxxxxxxxx’
alias: badkamer ventilator uit
trigger:
- above: ‘0’
below: ‘72’
entity_id: sensor.humidity_sonoff
platform: numeric_state
condition: []
action: - data:
entity_id: switch.sonoff174
service: switch.turn_off - id: ‘xxxxxxxxxxxxxxxx’
alias: badkamer ventilator aan
trigger:- above: ‘73’
below: ‘99’
entity_id: sensor.humidity_sonoff
platform: numeric_state
condition: []
action: - data:
entity_id: switch.sonoff174
service: switch.turn_on
- above: ‘73’