33 lines
875 B
YAML
33 lines
875 B
YAML
- id: humidifier_on
|
|
alias: '[Bedroom] Turn on humidifier'
|
|
mode: single
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.bedroom_air_purifier_humidity
|
|
below: '45'
|
|
- platform: state
|
|
entity_id: binary_sensor.bedroom_window_open_close
|
|
to: 'off'
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.bedroom_window_open_close
|
|
state: 'off'
|
|
- condition: numeric_state
|
|
entity_id: sensor.bedroom_air_purifier_humidity
|
|
below: '45'
|
|
action:
|
|
- service: script.humidifier_on
|
|
|
|
- id: humidifier_off
|
|
alias: '[Bedroom] Turn on humidifier'
|
|
mode: single
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.bedroom_air_purifier_humidity
|
|
above: '55'
|
|
- platform: state
|
|
entity_id: binary_sensor.bedroom_window_open_close
|
|
to: 'on'
|
|
action:
|
|
- service: script.humidifier_off
|