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,43 @@
alias: Garage Lights to Off
id: automation_garage_lights_to_off
mode: restart
trigger:
- platform: state
entity_id: input_boolean.garage_occupied
to: 'off'
- platform: state
entity_id:
- binary_sensor.inner_garage_door
- binary_sensor.outer_garage_door
- binary_sensor.garage_door
to: 'off'
for: '00:10:00'
- platform: state
entity_id: binary_sensor.garage_naturally_lit
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.lighting_automations
state: 'on'
- condition: state
entity_id: light.garage_overhead
state: 'on'
- condition: state
entity_id:
- binary_sensor.inner_garage_door
- binary_sensor.outer_garage_door
#- binary_sensor.garage_door
- input_boolean.garage_occupied
state: 'off'
action:
- service: light.turn_off
data:
entity_id: light.garage_overhead
@@ -0,0 +1,132 @@
alias: Garage Lights to On
id: automation_garage_lights_to_on
mode: single
# Hide warnings when triggered while in delay.
max_exceeded: silent
trigger:
- platform: state
id: "occupied"
entity_id: input_boolean.garage_occupied
to: "on"
- platform: state
id: "too_dim"
entity_id: binary_sensor.garage_naturally_lit
from: "on"
to: "off"
# - platform: state
# id: "motion"
# entity_id: group.garage_motion
# from: "off"
# to: "on"
- platform: state
id: "garage_door_opened"
entity_id: binary_sensor.garage_door
from: "off"
to: "on"
- platform: state
id: "garage_door_closed"
entity_id: binary_sensor.garage_door
from: "on"
to: "off"
- platform: state
id: "doors_open"
entity_id:
- binary_sensor.inner_garage_door
- binary_sensor.outer_garage_door
from: "off"
to: "on"
- platform: state
id: "doors_closed"
entity_id:
- binary_sensor.inner_garage_door
- binary_sensor.outer_garage_door
from: "on"
to: "off"
- platform: state
id: "workshop_motion"
entity_id: group.workshop_motion
from: "off"
to: "on"
# Only turn on the lights when necessary
condition:
- alias: Check if the lights should turn on
condition: or
conditions:
- alias: "Garage door was opened"
condition: trigger
id: "garage_door_opened"
- alias: Check if the light should turn on when the home is occupied
condition: and
conditions:
- alias: "Home is occupied"
condition: state
entity_id: input_boolean.home_occupied
state: "on"
- alias: "Check if light should turn on"
condition: or
conditions:
- alias: "Guest mode is on"
condition: state
entity_id: input_boolean.guest_mode
state: "on"
- alias: "Motion in dark garage, or workshop regardless of light level"
condition: or
conditions:
- alias: "Motion or occupancy were detected in a dim room"
condition: and
conditions:
- alias: "Room not naturally lit"
condition: state
entity_id: binary_sensor.garage_naturally_lit
state: 'off'
- alias: "Motion, occupancy, or door opening were detected"
condition: or
conditions:
- alias: "Motion was detected"
condition: trigger
id: "motion"
- alias: "Occupancy was detected"
condition: trigger
id: "occupied"
- alias: "Occupancy was detected"
condition: trigger
id: "doors_open"
- condition: state
entity_id: input_boolean.garage_occupied
state: "on"
- alias: "Motion in the workshop"
condition: and
conditions:
- condition: trigger
id: "workshop_motion"
- condition: state
entity_id: input_boolean.garage_occupied
state: "on"
action:
- alias: "Make sure Z-Wave switch is turned on"
service: homeassistant.turn_on
target:
entity_id: switch.garage_switch
- delay: 1
@@ -0,0 +1,78 @@
alias: 'Garage Not Occupied'
id: automation_garage_not_occupied
mode: restart
trigger:
- platform: state
entity_id:
- binary_sensor.garage_occupied
- binary_sensor.walkway_person_occupancy
- binary_sensor.workshop_person_occupancy
to: 'off'
for: '00:05:00'
condition:
- condition: state
entity_id: input_boolean.lights_off_manually
state: 'off'
- condition: state
entity_id: input_boolean.garage_occupied
state: 'on'
- condition: state
entity_id: binary_sensor.garage_occupied
state: 'off'
action:
- repeat:
sequence:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.garage_occupied
state: 'off'
for: '00:01:00'
- condition: or
conditions:
- condition: state
entity_id: input_select.house
state: 'Bachelor'
- condition: state
entity_id: input_boolean.kids_asleep
state: 'on'
sequence:
- service: homeassistant.turn_off
entity_id: input_boolean.garage_occupied
- conditions:
- condition: state
entity_id: binary_sensor.garage_occupied
state: 'off'
for: '00:05:00'
- condition: or
conditions:
- condition: state
entity_id: input_select.house
state: 'Auto'
- condition: state
entity_id: input_select.house
state: 'Dad'
sequence:
- service: homeassistant.turn_off
entity_id: input_boolean.garage_occupied
- conditions:
- condition: state
entity_id: binary_sensor.garage_naturally_lit
state: 'on'
for: '00:00:10'
sequence:
- service: homeassistant.turn_off
entity_id: input_boolean.garage_occupied
- delay:
minutes: 5
until:
- condition: state
entity_id: input_boolean.garage_occupied
state: 'off'
@@ -0,0 +1,17 @@
alias: 'Garage Occupied'
id: automation_garage_occupied
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.garage_occupied
to: 'on'
condition:
# Computer area was not already occupied
- condition: state
entity_id: input_boolean.garage_occupied
state: 'off'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.garage_occupied
@@ -0,0 +1,22 @@
alias: 'Garage open nobody home'
id: automation_garage_open_nobody_home
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.garage_open_nobody_home
to: 'on'
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.home_occupied
state: 'off'
- condition: state
entity_id: cover.garage_door
state: 'on'
action:
- service: notify.mobile_app_pixel_7
data:
message: The garage is open, but nobody is home