-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Counting warnings and erros in HA system #80
- Loading branch information
1 parent
39c7950
commit 64c2c5f
Showing
4 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
##### | ||
# Triggers when there is new warning or error | ||
# https://community.home-assistant.io/t/counter-warning-error-issue/85490/11 | ||
##### | ||
|
||
alias: Count Home Assistant errors | ||
id: 'c057ca2c-ab20-4fe0-a32b-5980c0990fb2' | ||
|
||
trigger: | ||
- platform: event | ||
event_type: system_log_event | ||
event_data: | ||
level: ERROR | ||
id: error | ||
- platform: event | ||
event_type: system_log_event | ||
event_data: | ||
level: WARNING | ||
id: warning | ||
|
||
action: | ||
- choose: | ||
- conditions: | ||
- condition: trigger | ||
id: warning | ||
sequence: | ||
- service: counter.increment | ||
entity_id: counter.homeassistant_warnings | ||
- conditions: | ||
- condition: trigger | ||
id: error | ||
sequence: | ||
- service: counter.increment | ||
entity_id: counter.homeassistant_errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
##### | ||
# Counting number of errors in HA | ||
# | ||
##### | ||
|
||
homeassistant_errors: | ||
name: Errors | ||
icon: mdi:alert-octagram | ||
restore: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
##### | ||
# Counting number of warnings in HA | ||
# | ||
##### | ||
|
||
homeassistant_warnings: | ||
name: Warnings | ||
icon: mdi:alert | ||
restore: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
##### | ||
# Using this integration to trigger events for log entries | ||
# https://www.home-assistant.io/integrations/system_log/ | ||
##### | ||
|
||
system_log: | ||
fire_event: true |