Home-AssistantConfig/config/packages/processmonitor.yaml

59 lines
1.8 KiB
YAML
Raw Normal View History

2018-01-02 00:00:45 +00:00
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
#-------------------------------------------
2018-01-02 02:10:53 +00:00
# homeassistant:
# customize:
# sensor.process_mosquitto:
# friendly_name: 'Mosquitto'
2018-01-22 18:39:14 +00:00
#
2018-01-02 02:10:53 +00:00
# hidden: False
2018-01-02 00:00:45 +00:00
#-------------------------------------------
sensor:
- platform: systemmonitor
resources:
# - type: last_boot
- type: last_boot
2018-01-02 00:00:45 +00:00
- type: disk_use_percent
arg: /
2018-01-02 00:00:45 +00:00
#-------------------------------------------
##############################################################################
### Automations - Detect when things are not right. Like any Good Watchdog.
##############################################################################
automation:
- alias: "Self Heal Disk Use Alarm"
trigger:
- platform: numeric_state
2019-02-23 19:27:23 +00:00
entity_id: sensor.disk_use_percent
2018-01-02 00:00:45 +00:00
above: 80
action:
- service: script.notify_engine
data_template:
value1: 'Hard Drive Monitor:'
2019-02-23 19:27:23 +00:00
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_percent.state }}%!"
2018-01-02 00:00:45 +00:00
value3: 'Attempting to clean'
who: 'carlo'
- service: tts.clear_cache
- alias: "Disk Use Alarm"
trigger:
- platform: numeric_state
2019-02-23 19:27:23 +00:00
entity_id: sensor.disk_use_percent
2018-01-02 00:00:45 +00:00
above: 90
action:
- service: script.notify_engine
data_template:
value1: 'Hard Drive Monitor:'
2019-02-23 19:27:23 +00:00
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_percent.state }}%!"
2018-01-02 00:00:45 +00:00
who: 'carlo'
- service: persistent_notification.create
data:
title: "Hard Drive Monitor:"
2019-02-23 19:27:23 +00:00
message: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_percent.state }}%!"
2018-01-02 00:00:45 +00:00
notification_id: "Critical Alert"