I have some cheap water sensors which have useless battery monitoring, and so they may die having never reported a battery level lower than 100%. As a workaround, I created an automation which triggers every 15 minutes, is conditioned on any one of the sensors' ..._last_seen entity being greater than 8 hours ago, and it sends me an e-mail.
This works, but the problem is once the condition becomes true, I'll keep getting an e-mail every 15 minutes until I fix it. Is there something I can add to the condition, or anything else I can do, to prevent the automation from performing its action for the same device and last_seen value? Is there anything I can use to record state information, and refer back to it?