initial push

This commit is contained in:
CeeWeasel
2024-04-14 14:08:56 -04:00
commit 53bf393d14
1111 changed files with 71730 additions and 0 deletions
@@ -0,0 +1,165 @@
alias: Nursery Out of Bed
id: automation_nursery_out_of_bed
mode: single
# Hide warnings when triggered while in delay.
max_exceeded: silent
trigger:
- platform: template
value_template: "{% if is_state('binary_sensor.nursery_door_person_occupancy','on') and is_state('binary_sensor.nursery_door','off')%}true{%endif%}"
- platform: state
entity_id: binary_sensor.black_bed_occupied
from: 'on'
to: 'off'
for: '00:00:05'
- platform: state
entity_id: binary_sensor.white_bed_occupied
from: 'on'
to: 'off'
for: '00:00:05'
- platform: state
entity_id: binary_sensor.nursery_door
from: 'off'
to: 'on'
condition:
- alias: "Do we want to be alerted?"
condition: state
entity_id: input_boolean.out_of_bed_alert
state: 'on'
- alias: "Is the home occupied or in guest mode?"
condition: or
conditions:
- condition: state
entity_id: input_boolean.home_occupied
state: 'on'
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
- alias: "Are any of the kids considered home?"
condition: or
conditions:
- condition: state
entity_id: input_boolean.emmett_home
state: 'on'
- condition: state
entity_id: input_boolean.bridget_home
state: 'on'
- condition: state
entity_id: input_boolean.ebin_home
state: 'on'
- alias: "Is at a time of day when the kids should be sleeping?"
condition: or
conditions:
- condition: state
entity_id: binary_sensor.evening
state: 'on'
- condition: state
entity_id: binary_sensor.late_evening
state: 'on'
- condition: state
entity_id: binary_sensor.night
state: 'on'
- condition: state
entity_id: binary_sensor.early_morning
state: 'on'
- alias: "Is Nursery Light Cycle turned off?"
condition: state
entity_id: input_boolean.nursery_light_cycle
state: 'off'
- alias: "Are the kids asleep?"
condition: state
entity_id: input_boolean.kids_asleep
state: 'on'
- alias: "Is an adult awake?"
condition: state
entity_id: binary_sensor.adults_asleep
state: 'off'
variables:
computer_area: "{{ states('binary_sensor.computer_area_person_occupancy') }}"
front_room: "{{ states('binary_sensor.front_room_person_occupancy') }}"
entryway: "{{ states('input_boolean.entryway_occupied') }}"
action:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.garage_occupied
state: 'on'
sequence:
- service: script.blink_garage_lights
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.computer_area_occupied
state: 'on'
sequence:
- service: webrtc.dash_cast
data:
entity_id: media_player.computer_area_hub
url: rtsp_cam08_sub
force: true
extra:
mode: webrtc
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.front_room_occupied
state: 'on'
sequence:
- service: webrtc.dash_cast
data:
entity_id: media_player.front_room_hub
url: rtsp_cam08_sub
force: true
extra:
mode: webrtc
- delay: '00:10:00'
- service: media_player.turn_off
entity_id: media_player.front_room_hub, media_player.computer_area_hub
# - alias: "Flash some lights"
# repeat:
# count: 6
# sequence:
# - delay: 1
# - service: light.toggle
# target:
# entity_id:
# - light.entryway_hue
# - light.computer_area_hue
# - light.front_room_hue
#- delay: '00:00:02'
# - alias: "Fix computer area lights"
# service: automation.trigger
# target:
# entity_id: "automation.computer_area_lights_to_{{ computer_area }}"
# data:
# skip_condition: true
# - alias: "Fix front room lights"
# service: automation.trigger
# target:
# entity_id: "automation.front_room_lights_to_{{ front_room }}"
# data:
# skip_condition: true
# - alias: "Fix entryway lights"
# service: automation.trigger
# target:
# entity_id: "automation.entryway_lights_to_{{ entryway }}"
# data:
# skip_condition: true