mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-21 16:44:46 +00:00
63 lines
1.8 KiB
YAML
Executable File
63 lines
1.8 KiB
YAML
Executable File
##############################################################################
|
|
### Detect when things are on and forgotten about.
|
|
##############################################################################
|
|
|
|
- alias: Automated Switch WatchDog!
|
|
trigger:
|
|
- platform: state
|
|
entity_id: switch.printer_outlet
|
|
state: 'on'
|
|
for: '00:35:00'
|
|
- platform: state
|
|
entity_id: switch.garage_outlet
|
|
state: 'on'
|
|
for: '03:00:00'
|
|
|
|
#Turn it off twice for good measure!
|
|
action:
|
|
- service: switch.turn_off
|
|
data_template:
|
|
entity_id: "{{ trigger.entity_id }}"
|
|
- delay: 00:01:00
|
|
- service: switch.turn_off
|
|
data_template:
|
|
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 }}"
|
|
|
|
##############################################################################
|
|
|
|
- alias: 9pm - is the Garage door Open
|
|
trigger:
|
|
- platform: time
|
|
after: '21:00:00'
|
|
- platform: sun
|
|
event: sunset
|
|
offset: '+01:00:00'
|
|
|
|
condition:
|
|
- condition: sun
|
|
after: 'sunset'
|
|
- condition: template
|
|
value_template: "{{ states('cover.garadget_large') != 'closed' }}"
|
|
- condition: template
|
|
value_template: "{{ states('cover.garadget_small') != 'closed' }}"
|
|
|
|
action:
|
|
- service: ifttt.trigger
|
|
data: {"event":"ifttt_notify", "value1":"Check Garage Doors ", "value2":"Small {{ states('cover.garadget_small')}}", "value3":"Large {{ states('cover.garadget_large')}} "}
|
|
|