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,57 @@
|
||||
alias: Teens Asleep
|
||||
id: automation_teens_asleep
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.marshall_is_awake
|
||||
- input_boolean.tess_is_awake
|
||||
- input_boolean.asleep
|
||||
to: 'off'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- 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: and
|
||||
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_on
|
||||
data:
|
||||
entity_id: input_boolean.teens_asleep
|
||||
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Teens Asleep
|
||||
entity_id: automation.teens_asleep
|
||||
message: >
|
||||
At least one of the teens is asleep. turning on teens_asleep
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.teens_asleep
|
||||
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Teens Asleep
|
||||
entity_id: automation.teens_asleep
|
||||
message: >
|
||||
None of the teens were asleep, defaulted to turning off teens_asleep
|
||||
Reference in New Issue
Block a user