mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
alias: Teens Awake
|
||||
id: automation_teen_awake
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# Consider the kids awake if it is after 6:00AM and any of them that are home are also awake
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.marshall_is_awake
|
||||
- input_boolean.tess_is_awake
|
||||
- binary_sensor.morning
|
||||
to: 'on'
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: time
|
||||
before: '19:00:00'
|
||||
after: '06:00:00'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_home
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.teens_bedtime
|
||||
- input_boolean.teens_asleep
|
||||
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_home
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.marshall_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.marshall_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_home
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.tess_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.tess_is_awake
|
||||
Reference in New Issue
Block a user