I am trying to notify myself whenever a battery powered device gets too low and tell me what device tripped that alert. I have a helper group called “sensor.battery_devices” that they all belong to.
Please encluse the code in three backticks so we can properly read it, as per point 11 in this post:
The problem with this approach is that only one low battery will keep your indicator active, so it won’t fire again when the next battery goes low. Luckily there’s a great blueprint to help you do battery notifications, so maybe you do not need to do all the hard work yourself. It is in the list when you add a new automation I believe.
i really wanted to find a way to do this without the for loop… using select/map, but i couldn’t figure it out… so here’s a for loop. hopefully someone else can tell how this might get done in a single non-for loop method, so try this.