mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
id: set_house_to_night
|
|
alias: Set House to Night
|
|
mode: single
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.night
|
|
to: 'on'
|
|
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.night
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_select.time_of_day
|
|
state: Night
|
|
|
|
action:
|
|
- service: input_select.select_option
|
|
data:
|
|
entity_id: input_select.time_of_day
|
|
option: Night
|
|
|
|
- delay: '00:00:30'
|
|
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.marshall_home
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.marshall_in_bed
|
|
state: 'off'
|
|
sequence:
|
|
- service: homeassistant.turn_on
|
|
entity_id: input_boolean.marshall_in_bed
|
|
- service: homeassistant.turn_off
|
|
entity_id: input_boolean.marshall_is_awake
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.tess_in_bed
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.tess_in_bed
|
|
state: 'off'
|
|
sequence:
|
|
- service: homeassistant.turn_on
|
|
entity_id: input_boolean.tess_in_bed
|
|
- service: homeassistant.turn_off
|
|
entity_id: input_boolean.tess_is_awake |