Error in 'if[2]' evaluation

On my crusade to resolve or at least understand my HA Warnings and Errors I came accross yet another topic where I hope your experience can help me look through the fog.

Logger: homeassistant.helpers.script
Source: helpers/script.py:420
First occurred: 10:26:25 (1 occurrences)
Last logged: 10:26:25

Error in 'if[2]' evaluation: In 'or' (item 2 of 2): In 'state': In 'state' condition: unknown entity sensor.ups_battery_level

sensor.ups_battery_level is the name of a no longer existing entity. It got replaced by sensor.ups_battery_level_calc.
:wink: And yes, I have restarted since that change, twice even.

How do I find the script / automation that is still using the old entity name?
I did a “Find in File” accross the entire “config” folder and the only hits that I got were in .log or my old manual config backup .txt files, so nothing that HA would actually execute.

Is there something in the Error Message that would give me a hint as to where to look, that I am not seeing?

Nobody any ideas?

Happens from time to time and seems as if the HA log caches errors that have been fixed already. I regularly delete the contents of the log files to get rid off the notifications.

Alternatively, have a look at https://github.com/dummylabs/thewatchman

Oh! interesting!
I definately need to have a closer look at thewatchman
Sounds very helpfull.

Thanks for sharing!