Personally, I find an automation only works well for this particular problem if the device you’re getting an alert for is your phone. Due to their power draw and usage phone battery level goes up and down quickly. Generally if you get an notification about your phone being at 15-20% or less you’re gonna go plug it in right away.
But for all the other IOT devices around my house, a low battery alert most likely isn’t urgent. I know I have to replace it but I’m not going to drop what I’m doing to go do so. Most of these devices take months or more to deplete the battery. So I prefer an alert since that will continue to bug me until I solve the problem.
For anyone interested, I did a quick write up of my own solution and shared it as a package here (didn’t want to clog up this thread with it). Can’t make it a blueprint unfortunately since its not an automation.