2016-11-21 19:42:06 +00:00
|
|
|
##############################################################################
|
|
|
|
### Detect when things are on and forgotten about.
|
|
|
|
##############################################################################
|
|
|
|
|
2016-11-21 20:22:01 +00:00
|
|
|
- alias: Automated Switch WatchDog!
|
2016-11-21 19:42:06 +00:00
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: switch.printer_outlet
|
|
|
|
state: 'on'
|
|
|
|
for: '00:35:00'
|
2016-11-21 20:22:01 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: switch.garage_outlet
|
|
|
|
state: 'on'
|
|
|
|
for: '03:00:00'
|
|
|
|
|
2016-11-21 19:42:06 +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 }}"
|
2016-11-21 20:22:01 +00:00
|
|
|
|
2016-11-24 01:16:05 +00:00
|
|
|
##############################################################################
|
|
|
|
|
2016-11-21 20:22:01 +00:00
|
|
|
- alias: Automated Light WatchDog!
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: light.hallway
|
|
|
|
state: 'on'
|
|
|
|
for: '00:20:00'
|
2016-12-02 18:56:33 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: group.foyer_lights
|
|
|
|
state: 'on'
|
|
|
|
for: '00:20:00'
|
2016-11-21 20:22:01 +00:00
|
|
|
|
|
|
|
#Turn it off!
|
|
|
|
action:
|
|
|
|
- service: light.turn_off
|
|
|
|
data_template:
|
|
|
|
entity_id: "{{ trigger.entity_id }}"
|
2016-11-28 19:31:57 +00:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
2016-11-30 22:37:46 +00:00
|
|
|
- alias: Is the Garage door Open at night - Checks every 60 minutes or 5 minutes after we drive away.
|
2016-11-28 19:31:57 +00:00
|
|
|
trigger:
|
|
|
|
- platform: time
|
2016-11-30 22:37:46 +00:00
|
|
|
minutes: '/60'
|
2016-11-28 19:38:17 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id: group.family
|
|
|
|
state: not_home
|
|
|
|
for: 00:05:00
|
2016-11-28 19:31:57 +00:00
|
|
|
|
|
|
|
condition:
|
2016-12-04 06:06:08 +00:00
|
|
|
condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: and
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: group.family
|
|
|
|
state: not_home
|
|
|
|
for: 00:05:00
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: template
|
|
|
|
value_template: "{{ states('cover.garadget_large') == 'opened' }}"
|
|
|
|
- condition: template
|
|
|
|
value_template: "{{ states('cover.garadget_small') == 'opened' }}"
|
|
|
|
- condition: and
|
|
|
|
conditions:
|
|
|
|
- condition: sun
|
|
|
|
after: 'sunset'
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: template
|
|
|
|
value_template: "{{ states('cover.garadget_large') == 'opened' }}"
|
|
|
|
- condition: template
|
|
|
|
value_template: "{{ states('cover.garadget_small') == 'opened'}}"
|
2016-11-28 19:31:57 +00:00
|
|
|
|
|
|
|
action:
|
2016-12-01 04:20:45 +00:00
|
|
|
service: script.ifttt_notify
|
|
|
|
data_template:
|
|
|
|
value1: 'Check Garage Doors:'
|
|
|
|
value2: "Small: {{ states('cover.garadget_small')}}"
|
|
|
|
value3: "Large: {{ states('cover.garadget_large')}}"
|
2016-11-28 19:31:57 +00:00
|
|
|
|
2016-12-06 16:05:28 +00:00
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
- alias: If Outdoor lights are on and it's daytime, TURN THEM OFF!!
|
|
|
|
trigger:
|
|
|
|
- platform: time
|
|
|
|
minutes: '/47'
|
|
|
|
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: sun.sun
|
|
|
|
state: 'above_horizon'
|
|
|
|
- condition: state
|
|
|
|
entity_id: group.outdoor_lights
|
|
|
|
state: 'on'
|
|
|
|
|
|
|
|
action:
|
|
|
|
- service: light.turn_off
|
|
|
|
entity_id: group.outdoor_lights
|
|
|
|
|