Battery power percentage displayed

Most of my devices are battery powered motion sensors and contact sensors. With IRIS things would start to go squirrely when battery power dropped below around 40%. I don't know if Hubitat has the same problem. However it would be nice if the battery power percentage could be displayed on the device tiles. Now I have to check each one individually which is a pain.

Does Hubitat alert you when a battery is getting low? I have one that is at 24 and so far Hubitat has been silent.

You can use HSM to create a custom rule that does that, nice a simple just go though the app.

I use the notifications app to notify me of low battery levels. (And also tamper on sensors that support it) On the dash you can select the multi sensor template to see if it displays battery on the tile for you. I have v1 iris contact and motion and a Monoprice contact sensor and they default to display the battery on the tile. I change them to the multi sensor template to also display the temp on the tile.

Depending on the device / sensor, tiles can show battery percentage like..

As mentioned above Notifications can also be setup to message you.

You can also make a Battery dashboard with a Dashboard Link from your main dashboard

3 Likes

Thanks for the advice. I have it working now. Any suggestions on at what level batteries should be replaced? With IRIS I saw posts that said below 40%.

I have my SHM alerting me at less than 40 just so I can get them replaced before they stop responding the 30% threshold on Iris was not enough as I would often get notified of a device being offline instead of low battery or I'd be notified of a low battery only to have it go offline an hour or less later before I had time to get to replacing it. Maybe 35 would be sufficient in most cases? But I'm trying to use mostly rechargeable batteries now so I don't feel bad replacing them early. Although the CR2 rechargeable batteries are still a little hard to find.

One note on battery levels... if you are using lithium batteries you have to set the % alert much higher (like 80%) due to how the curve for lithium battery decay works.

For most devices, lower is ok for non-lithium batteries, though. But even that is device dependent on how they convert voltage to %. I really wish all manufacturers would report raw voltage numbers instead of %, but I understand why they don't for the average consumer.

2 Likes

@tterk1
This was exactly what I was looking to do. Thanks!

I have it setup same way, but is there an option to show a different color in say red under a certain % of the battery. I changed the template but it didn't give me options for % of battery. thanks,

If you inspect the battery tile you'll see that it uses some "hidden" CSS classes that you can override if you wish; i.e. he-battery_75_color, he-battery_25_color, etc...

Follow-up: The above classes only relate to the icon attributes so changing background-color to red will only change the background of the icon to red not the whole tile.

Follow-up 2: Looks like there is also a class per percentage (i.e. battery-39) that is set based on the battery percentage that is set at a higher level in the HTML that covers approximately 85-90% of the tile. You could use this knowledge to create a set of class overrides that would allow you to customize the tile somewhat.

1 Like