Hello,
I have an automation that I intened to fire every time there is a lightning strick, I’m doing this by putting a trigger on a sensor that has a lightning strike count, so every time the number goes up (or goes down which would be a false positive, but I can accept that) it goes off. Problem is, It’s been happening randomly when there was no change in the count. I learning how automations and going through the traces, I came to learn that the issue is from the entity going to an “unvailable” state and then back to “0”. So the state is changing, just not how I expect it to.
My thinking is that the trigger should only happen when the state changes, but to a number greater than the previous state and ignore any changes where the value goes down, or where the value goes from “unavailable” to “0” or back.
How would I go about this?