mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-18 19:26:57 +00:00
Closes #70 - Split out Watchdog configs
This commit is contained in:
23
automation/System/disk_usage.yaml
Executable file
23
automation/System/disk_usage.yaml
Executable file
@@ -0,0 +1,23 @@
|
||||
##############################################################################
|
||||
### Detect when things are on and forgotten about. Like any Good Watchdog.
|
||||
##############################################################################
|
||||
|
||||
- alias: "Disk Use Alarm"
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.disk_use_
|
||||
above: 80
|
||||
action:
|
||||
- service: script.Voice_notify
|
||||
data_template:
|
||||
value1: 'ATTENTION: Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_.state }}%!'
|
||||
- service: script.ifttt_notify
|
||||
data_template:
|
||||
value1: 'Hard Drive Monitor:'
|
||||
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_.state }}%!"
|
||||
value3: ' '
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: "Hard Drive Monitor:"
|
||||
message: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_.state }}%!"
|
||||
notification_id: "Critical Alert"
|
21
automation/System/ip_change.yaml
Executable file
21
automation/System/ip_change.yaml
Executable file
@@ -0,0 +1,21 @@
|
||||
##############################################################################
|
||||
### Detect when things are on and forgotten about. Like any Good Watchdog.
|
||||
##############################################################################
|
||||
|
||||
##############################################################################
|
||||
|
||||
- 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!'
|
||||
|
||||
##############################################################################
|
@@ -1,99 +0,0 @@
|
||||
##############################################################################
|
||||
### 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'
|
||||
for: '00:20: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
|
||||
- group.foyer_lights
|
||||
- light.master_toilet
|
||||
state: 'on'
|
||||
for: '00:20:00'
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- light.paige_go
|
||||
- light.justin_go
|
||||
- group.upstairs
|
||||
state: 'on'
|
||||
for: '02: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!'
|
||||
|
||||
##############################################################################
|
||||
|
||||
- alias: "New device connected"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: device_tracker_new_device
|
||||
action:
|
||||
- service: script.Voice_notify
|
||||
data_template:
|
||||
value1: "There has been a new device detected on the network. Be sure to appropriately catagorize it within Circle."
|
||||
|
||||
##############################################################################
|
||||
|
||||
- alias: "Disk Use Alarm"
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.disk_use_
|
||||
above: 80
|
||||
action:
|
||||
- service: script.Voice_notify
|
||||
data_template:
|
||||
value1: 'ATTENTION: Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_.state }}%!'
|
||||
- service: script.ifttt_notify
|
||||
data_template:
|
||||
value1: 'Hard Drive Monitor:'
|
||||
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_.state }}%!"
|
||||
value3: ' '
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: "Hard Drive Monitor:"
|
||||
message: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_.state }}%!"
|
||||
notification_id: "Critical Alert"
|
27
automation/System/watchdog_light.yaml
Executable file
27
automation/System/watchdog_light.yaml
Executable file
@@ -0,0 +1,27 @@
|
||||
##############################################################################
|
||||
### Detect when things are on and forgotten about. Like any Good Watchdog.
|
||||
##############################################################################
|
||||
|
||||
- alias: Automated Light WatchDog!
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- light.hallway
|
||||
- group.foyer_lights
|
||||
- light.master_toilet
|
||||
state: 'on'
|
||||
for: '00:20:00'
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- light.paige_go
|
||||
- light.justin_go
|
||||
- group.upstairs
|
||||
state: 'on'
|
||||
for: '02:00:00'
|
||||
|
||||
#Turn it off!
|
||||
action:
|
||||
- service: light.turn_off
|
||||
data_template:
|
||||
entity_id: "{{ trigger.entity_id }}"
|
25
automation/System/watchdog_switch.yaml
Executable file
25
automation/System/watchdog_switch.yaml
Executable file
@@ -0,0 +1,25 @@
|
||||
##############################################################################
|
||||
### 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'
|
||||
for: '00:20: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 }}"
|
||||
|
Reference in New Issue
Block a user