This is my first time working with Lovelace. I created a card that is designed for displaying battery information for battery entities. Entity icon will display a color indicating the level, and the icons also show how far along the battery is. There are custom thresholds for the warning levels.
This looks good, nice work. One thing that this other similar component does is provide notifications when levels gets to the thresholds set. Any chance of including something like this?
I don’t think notifications would be possible with this, as Lovelace cards really just touch the frontend interface. As far as I know, they can’t do anything with the backend such as creating notifications.
However, still learning the ropes of how Lovelace works, maybe I don’t know all the functionality yet.
I don’t mean to do the actual notification from the card, just call an existing notify service and send the entity details of which device is low.
I’m kind of just thinking out loud here… The custom card tracker card has a function to check for updates each day, so I wonder if that code could help work out how to do it?
Use this script; and set an automation to run it every few hours. I run it every 6 hours. It will check all the devices battery level and send a notification if any under the threshold.
It works from the zwave domain and uses the attributes so no sensors need to be created.
@cbulock Hello! Thanks for your work! These are really cool cards! Is it possible to remove the color setting from the battery icons? I want my theme to be the same everywhere, but the green icons do not fit into my HA theme ))
yeh, that filter belongs to the auto-entities card. Of course it doesn’t work if you have entities that use a different attribute name - I don’t have any. It could be tweaked, I’m sure.