mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
70 lines
2.0 KiB
YAML
70 lines
2.0 KiB
YAML
alias: Adults Asleep
|
|
id: automation_adults_asleep
|
|
mode: queued
|
|
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
- platform: state
|
|
entity_id:
|
|
- input_boolean.clint_is_awake
|
|
- input_boolean.kristy_is_awake
|
|
- input_boolean.guest_is_awake
|
|
to: 'off'
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.clint_is_awake
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.clint_home
|
|
state: 'on'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.kristy_is_awake
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.kristy_home
|
|
state: 'on'
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.guest_is_awake
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.guest_home
|
|
state: 'on'
|
|
sequence:
|
|
- service: input_boolean.turn_on
|
|
data:
|
|
entity_id:
|
|
- input_boolean.asleep
|
|
- input_boolean.teens_asleep
|
|
- input_boolean.kids_asleep
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: input_select.master_bedroom_mode
|
|
data:
|
|
option: Nightlight
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.patio_door_contact
|
|
state: 'off'
|
|
sequence:
|
|
- service: lock.lock
|
|
target:
|
|
entity_id: lock.patio_door
|
|
|
|
default:
|
|
- service: input_boolean.turn_off
|
|
data:
|
|
entity_id: input_boolean.asleep
|