2016-12-21 17:27:18 +00:00
|
|
|
##############################################################################
|
|
|
|
### Detect when things are on and forgotten about. Like any Good Watchdog.
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
- alias: Automated Switch WatchDog!
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: switch.printer_outlet
|
|
|
|
state: 'on'
|
2017-02-04 02:11:01 +00:00
|
|
|
for: '00:20:00'
|
2016-12-21 17:27:18 +00: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
|
2017-01-25 16:29:28 +00:00
|
|
|
entity_id:
|
|
|
|
- light.hallway
|
|
|
|
- group.foyer_lights
|
2017-01-29 22:30:08 +00:00
|
|
|
- light.master_toilet
|
2016-12-21 17:27:18 +00:00
|
|
|
state: 'on'
|
|
|
|
for: '00:20:00'
|
2017-01-25 16:29:28 +00:00
|
|
|
|
2016-12-26 19:39:48 +00:00
|
|
|
- platform: state
|
|
|
|
entity_id:
|
|
|
|
- light.paige_go
|
|
|
|
- light.justin_go
|
2017-02-02 02:03:00 +00:00
|
|
|
- group.upstairs
|
2016-12-26 19:39:48 +00:00
|
|
|
state: 'on'
|
|
|
|
for: '02:00:00'
|
2016-12-21 17:27:18 +00:00
|
|
|
|
|
|
|
#Turn it off!
|
|
|
|
action:
|
|
|
|
- service: light.turn_off
|
|
|
|
data_template:
|
|
|
|
entity_id: "{{ trigger.entity_id }}"
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
- alias: "NOTIFY IF IP CHANGES"
|
|
|
|
hide_entity: True
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: sensor.ipchange
|
|
|
|
from: 'False'
|
|
|
|
to: 'True'
|
|
|
|
action:
|
|
|
|
- service: script.ifttt_notify
|
|
|
|
data_template:
|
|
|
|
value1: 'Changed IP address:'
|
|
|
|
value2: "New IP: {{ states('sensor.exteral_ip') }}"
|
|
|
|
value3: ' - Be sure to Change DNS!'
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
2017-02-04 22:52:11 +00:00
|
|
|
- alias: "New device connected"
|
|
|
|
trigger:
|
|
|
|
- platform: event
|
|
|
|
event_type: device_tracker_new_device
|
|
|
|
action:
|
|
|
|
- service: script.Voice_notify
|
|
|
|
data_template:
|
2017-02-04 23:17:45 +00:00
|
|
|
value1: "There has been a new device detected on the network. Be sure to appropriately catagorize it within Circle."
|