Hi,
I have written this script, but I don’t know where to use it?
hvac_everyone_left_single:
alias: HVAC Mode after leaving the house (single)
description: "Set the correct hvac mode after everyone has left home."
fields:
sensor_entity:
description: "Humidity state sensor"
climate_entity:
description: "HVAC entity"
sequence:
- choose:
- conditions:
- condition: state
entity_id: "{{ sensor_entity }}"
state: high
sequence:
- service: climate.set_hvac_mode
target:
entity_id: "{{ climate_entity }}"
data:
hvac_mode: dry
- wait_for_trigger:
- platform: state
entity_id: "{{ sensor_entity }}"
from: medium
to: low
- service: climate.set_hvac_mode
target:
entity_id: "{{ climate_entity }}"
data:
hvac_mode: 'off'
- conditions:
- condition: or
conditions:
- condition: state
entity_id: "{{ sensor_entity }}"
state: medium
- condition: state
entity_id: "{{ sensor_entity }}"
state: low
sequence:
- service: climate.set_hvac_mode
target:
entity_id: "{{ climate_entity }}"
data:
hvac_mode: 'off'
default: []
mode: parallel
hvac_everyone_left_all:
alias: HVAC Mode after leaving the house (single)
description: "Set the correct hvac mode after everyone has left home."
sequence:
- service: script.turn_on
target:
entity_id: script.hvac_everyone_left_single
data:
variables:
sensor_entity: sensor.bedroom_humidity_state
climate_entity: climate.master_bedroom
- service: script.turn_on
target:
entity_id: script.hvac_everyone_left_single
data:
variables:
sensor_entity: sensor.guest_room_humidity_state
climate_entity: climate.guest_room
Is that even possible to do?