Hi ha community,
I have multiple humidity sensors (for different bathrooms). I would like automate the switch on/off of my ventilation based on the humidity percentage.
For switch on, if one of my sensors has an numeric state above 65%, no problem:
- alias: 'ventilation on'
trigger:
platform: numeric_state
entity_id: sensor.xxxxxxxxxxxxx_relative_humidity, sensor.xxxxxxxxxxxxx_relative_humidity_2
above: 65
action:
- service: switch.turn_on
entity_id: switch.xxxxxxxxxxxxx_switch
But for the switch off, it’s more complicated cause every sensors must be below 60%, and I can’t do that:
- alias: 'ventilation off'
trigger:
platform: numeric_state
entity_id: sensor.xxxxxxxxxxxxx_relative_humidity, sensor.xxxxxxxxxxxxx_relative_humidity_2
below: 60
action:
- service: switch.turn_off
entity_id: switch.xxxxxxxxxxxxx_switch
How can you specify an AND operator in the entity_id list?
Thanks in advance.