mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-20 04:04:06 +00:00
You can find the entire repo here.
This commit is contained in:
58
config/packages/processmonitor.yaml
Executable file
58
config/packages/processmonitor.yaml
Executable file
@@ -0,0 +1,58 @@
|
||||
#-------------------------------------------
|
||||
# @CCOSTAN
|
||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
#-------------------------------------------
|
||||
# homeassistant:
|
||||
# customize:
|
||||
# sensor.process_mosquitto:
|
||||
# friendly_name: 'Mosquitto'
|
||||
#
|
||||
# hidden: False
|
||||
|
||||
#-------------------------------------------
|
||||
sensor:
|
||||
- platform: systemmonitor
|
||||
resources:
|
||||
# - type: last_boot
|
||||
- type: since_last_boot
|
||||
- type: disk_use_percent
|
||||
arg: /
|
||||
- platform: database
|
||||
#-------------------------------------------
|
||||
##############################################################################
|
||||
### Automations - Detect when things are not right. Like any Good Watchdog.
|
||||
##############################################################################
|
||||
|
||||
automation:
|
||||
|
||||
- alias: "Self Heal Disk Use Alarm"
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.disk_use_percent_
|
||||
above: 80
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Hard Drive Monitor:'
|
||||
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_percent_.state }}%!"
|
||||
value3: 'Attempting to clean'
|
||||
who: 'carlo'
|
||||
- service: tts.clear_cache
|
||||
|
||||
- alias: "Disk Use Alarm"
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.disk_use_percent_
|
||||
above: 90
|
||||
action:
|
||||
- service: script.notify_engine
|
||||
data_template:
|
||||
value1: 'Hard Drive Monitor:'
|
||||
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_percent_.state }}%!"
|
||||
who: 'carlo'
|
||||
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: "Hard Drive Monitor:"
|
||||
message: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_percent_.state }}%!"
|
||||
notification_id: "Critical Alert"
|
Reference in New Issue
Block a user