mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-21 16:44:46 +00:00
Added in some Watchdog Routines to auto shut down lights and switches.
This commit is contained in:
parent
46b5c280e8
commit
c61be3cd61
42
automation/away.yaml
Executable file
42
automation/away.yaml
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
######################################################################
|
||||||
|
## Shut it all down. No one is here
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
- alias: 'Away Mode'
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: binary_sensor.upstairs_away_mode
|
||||||
|
to: 'on'
|
||||||
|
- platform: state
|
||||||
|
entity_id: binary_sensor.downstairs_away_mode
|
||||||
|
to: 'on'
|
||||||
|
- platform: state
|
||||||
|
entity_id: group.family
|
||||||
|
state: not_home
|
||||||
|
|
||||||
|
condition:
|
||||||
|
condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: group.family
|
||||||
|
state: not_home
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.guest_mode
|
||||||
|
state: 'off'
|
||||||
|
|
||||||
|
action:
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: group.interior_lights
|
||||||
|
- service: switch.turn_off
|
||||||
|
entity_id: group.amps
|
||||||
|
- delay: 00:01:00
|
||||||
|
- service: switch.turn_off
|
||||||
|
entity_id: switch.foyer_outlet
|
||||||
|
- delay: 00:01:00
|
||||||
|
- service: switch.turn_off
|
||||||
|
entity_id: switch.kitchen_accents
|
||||||
|
- delay: 00:01:00
|
||||||
|
- service: switch.turn_off
|
||||||
|
entity_id: switch.garage_outlet
|
||||||
|
|
||||||
|
|
@ -1,42 +1,68 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
## Shut it all down. No one is here or we went to sleep.
|
## Weekday Morning Routines for the Wife and Kiddos.
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
- alias: 'GoodNight - Away Mode'
|
- alias: 'Good Morning Routine'
|
||||||
trigger:
|
trigger:
|
||||||
- platform: event
|
- platform: event
|
||||||
event_type: good_night
|
event_type: good_morning
|
||||||
- platform: state
|
- platform: time
|
||||||
entity_id: binary_sensor.upstairs_away_mode
|
after: '06:00:00'
|
||||||
to: 'on'
|
|
||||||
- platform: state
|
|
||||||
entity_id: binary_sensor.downstairs_away_mode
|
|
||||||
to: 'on'
|
|
||||||
- platform: state
|
|
||||||
entity_id: group.family
|
|
||||||
state: not_home
|
|
||||||
|
|
||||||
condition:
|
condition:
|
||||||
condition: and
|
- condition: state
|
||||||
conditions:
|
entity_id: group.family
|
||||||
- condition: state
|
state: home
|
||||||
entity_id: group.family
|
- condition: state
|
||||||
state: not_home
|
entity_id: input_boolean.no_school
|
||||||
- condition: state
|
state: 'off'
|
||||||
entity_id: input_boolean.guest_mode
|
- condition: time
|
||||||
state: 'off'
|
weekday:
|
||||||
|
- mon
|
||||||
|
- tue
|
||||||
|
- wed
|
||||||
|
- thu
|
||||||
|
- fri
|
||||||
|
|
||||||
action:
|
action:
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id:
|
||||||
|
- light.s1
|
||||||
|
- light.s4
|
||||||
|
data:
|
||||||
|
brightness: 150
|
||||||
|
- service: switch.turn_on
|
||||||
|
entity_id: switch.kitchen_accents
|
||||||
|
- delay: 00:01:00
|
||||||
|
- service: switch.turn_on
|
||||||
|
entity_id: switch.kitchen_accents
|
||||||
|
- delay: 00:50:00
|
||||||
|
# 6:50am now.
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id:
|
||||||
|
- light.d1
|
||||||
|
- light.d2
|
||||||
|
- group.kitchen_lights
|
||||||
|
data:
|
||||||
|
brightness: 150
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: group.interior_lights
|
entity_id:
|
||||||
- service: switch.turn_off
|
- group.dining_room_lights
|
||||||
entity_id: group.amps
|
|
||||||
- delay: 00:01:00
|
|
||||||
- service: switch.turn_off
|
|
||||||
entity_id: switch.foyer_outlet
|
|
||||||
- delay: 00:01:00
|
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
entity_id: switch.kitchen_accents
|
entity_id: switch.kitchen_accents
|
||||||
|
- delay: 01:00:00
|
||||||
|
# 7:50am now.
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id:
|
||||||
|
- group.kitchen_lights
|
||||||
|
data:
|
||||||
|
brightness: 200
|
||||||
|
|
||||||
|
- delay: 00:40:00
|
||||||
|
# 8:30am now.
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id:
|
||||||
|
- group.interior_lights
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -12,7 +12,10 @@
|
|||||||
- platform: state
|
- platform: state
|
||||||
entity_id: group.family
|
entity_id: group.family
|
||||||
state: home
|
state: home
|
||||||
|
- platform: state
|
||||||
|
entity_id: group.garage_doors
|
||||||
|
state: 'open'
|
||||||
|
|
||||||
condition:
|
condition:
|
||||||
condition: and
|
condition: and
|
||||||
conditions:
|
conditions:
|
||||||
|
@ -2,13 +2,17 @@
|
|||||||
### Detect when things are on and forgotten about.
|
### Detect when things are on and forgotten about.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
- alias: Printer on for more than 35 minutes
|
- alias: Automated Switch WatchDog!
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: switch.printer_outlet
|
entity_id: switch.printer_outlet
|
||||||
state: 'on'
|
state: 'on'
|
||||||
for: '00:35:00'
|
for: '00:35:00'
|
||||||
|
- platform: state
|
||||||
|
entity_id: switch.garage_outlet
|
||||||
|
state: 'on'
|
||||||
|
for: '03:00:00'
|
||||||
|
|
||||||
#Turn it off twice for good measure!
|
#Turn it off twice for good measure!
|
||||||
action:
|
action:
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
@ -18,4 +22,16 @@
|
|||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: "{{ trigger.entity_id }}"
|
entity_id: "{{ trigger.entity_id }}"
|
||||||
|
|
||||||
|
- alias: Automated Light WatchDog!
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: light.hallway
|
||||||
|
state: 'on'
|
||||||
|
for: '00:20:00'
|
||||||
|
|
||||||
|
#Turn it off!
|
||||||
|
action:
|
||||||
|
- service: light.turn_off
|
||||||
|
data_template:
|
||||||
|
entity_id: "{{ trigger.entity_id }}"
|
@ -54,6 +54,7 @@ logbook:
|
|||||||
- sensor.garadget_large_time_in_state
|
- sensor.garadget_large_time_in_state
|
||||||
- sensor.garadget_large_wifi_signal_strength
|
- sensor.garadget_large_wifi_signal_strength
|
||||||
- sensor.garadget_small_wifi_signal_strength
|
- sensor.garadget_small_wifi_signal_strength
|
||||||
|
- group.garage_doors
|
||||||
#logger:
|
#logger:
|
||||||
# default: info
|
# default: info
|
||||||
recorder:
|
recorder:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user