1
0
ansible-home-assistant/configuration/automations/modes.yaml

49 lines
1.1 KiB
YAML

- id: sleep_on
alias: '[Mode] Turn on sleep mode'
trigger:
- platform: time
at: input_datetime.sleep_mode
- platform: state
entity_id:
- group.guests
to: not_home
condition:
- condition: state
entity_id: group.guests
state: not_home
- condition: time
before: input_datetime.day_mode
after: input_datetime.sleep_mode
action:
- service: input_boolean.turn_on
entity_id: input_boolean.sleep_mode
mode: single
- id: sleep_off
alias: '[Mode] Turn off sleep mode'
trigger:
- platform: time
at: input_datetime.day_mode
action:
- service: input_boolean.turn_off
entity_id: input_boolean.sleep_mode
mode: single
- id: sleep_temperature
alias: '[Sleep] Set temperature in bedroom'
trigger:
- platform: state
entity_id:
- input_boolean.sleep_mode
to: 'on'
condition:
- condition: state
entity_id: input_select.home_mode
state: Day
action:
- service: climate.set_temperature
data:
temperature: 23
target:
entity_id: climate.bedroom_thermostat