BeardedTinker/Home-Assistant_Config

Counting errors and warnings

Closed this issue · 1 comments

I love HA community - I really love all the questions that end up as ideas for future improvements to HA.

One question today was (from Jaap):

Would it be possible to keep track of the number of warnings and errors? It would be interesting to see how these develop over time.
I can imagine it is difficult to set up but it would be worth some effort

10 minutes and one HA community thread later - it's here.
Working counter, that can track new errors and warnings in HA logs, and count them also.

A note on this one. During startup if there are a lot of errors, system may become overwhelmed with them and create errors for failing to count errors (you see issue, error counter, creating additional errors).

To solve this, I've added line of code to automation that gets triggered:

mode: queued
max: 20
max_exceeded: silent

This increases queue to 20 from 10 that is default.
And if it goes even above 20, it will just stay silent and not throw additional error.

Not perfect - but works!