diff --git a/configuration/automations/bedroom-humidifier.yaml b/configuration/automations/bedroom-humidifier.yaml index d7d10f7..c7797f1 100644 --- a/configuration/automations/bedroom-humidifier.yaml +++ b/configuration/automations/bedroom-humidifier.yaml @@ -1,5 +1,6 @@ - id: humidifier_on alias: '[Bedroom] Turn on humidifier' + mode: single trigger: - platform: numeric_state entity_id: sensor.bedroom_air_purifier_humidity @@ -15,12 +16,11 @@ entity_id: sensor.bedroom_air_purifier_humidity below: '45' action: - - service: switch.turn_on - entity_id: switch.humidifier_plug - mode: single + - 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 @@ -29,6 +29,4 @@ entity_id: binary_sensor.bedroom_window_open_close to: 'on' action: - - service: switch.turn_off - entity_id: switch.humidifier_plug - mode: single + - service: script.humidifier_off diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index 3f6ca07..642e9e5 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -20,6 +20,8 @@ good_night: - service: switch.turn_off entity_id: - switch.printer_switch + - switch.xmas_lights_on_off + - service: script.humidifier_off - service: cover.close_cover entity_id: - cover.bedroom_blinds @@ -32,7 +34,6 @@ good_night: state: unlocked sequence: - service: lock.lock - data: { } target: entity_id: lock.front_door_lock_doorlock - choose: @@ -61,9 +62,6 @@ good_night: entity_id: - climate.office_thermostat - climate.dining_thermostat - - service: switch.turn_off - entity_id: - - switch.xmas_lights_on_off - service: light.turn_off entity_id: - light.couch_lights @@ -115,6 +113,7 @@ good_morning: entity_id: - switch.computer_outlet - switch.xmas_lights_on_off + - service: script.humidifier_on - service: switch.turn_off entity_id: switch.mute_doorbell - service: switch.turn_on diff --git a/scripts/12.humidifier.yaml b/scripts/12.humidifier.yaml new file mode 100644 index 0000000..c846658 --- /dev/null +++ b/scripts/12.humidifier.yaml @@ -0,0 +1,27 @@ +humidifier_on: + alias: Humidifier On + sequence: + - choose: + - conditions: + - condition: numeric_state + entity_id: sensor.bedroom_air_purifier_humidity + below: '45' + - condition: state + entity_id: binary_sensor.bedroom_window_open_close + state: 'off' + - condition: not + conditions: + - condition: state + entity_id: input_select.home_mode + state: 'Night' + sequence: + - service: switch.turn_on + entity_id: + - switch.humidifier_plug + +humidifier_off: + alias: Humidifier Off + sequence: + - service: switch.turn_off + entity_id: + - switch.humidifier_plug \ No newline at end of file