[Custom Component] Battery Notes

I created a new custom integration for #HomeAssistant that allows you to attach a note to an existing device to indicate the battery type it takes, which then shows up in the Diagnostic section of the device. This allows me to go pre-armed with the right battery when a battery is getting low, which shows up using an auto-entities list on my main dashboard.

Full details here on how to add it either via a HACS custom repository or manually

27 Likes

Hey there, thanks a lot for thinking about this and doing it, it seems very promising!

2 Likes

A new release of Battery Notes just went live, introducing a battery library for common devices and discovery to save manually adding them yourself.

Thanks to those who were testing the betas for adding to the library so we start with a good selection of devices but more submissions most welcome!

2 Likes

Great work with integration. Just wondering if there is a accessible link to the battery library without installing? thanks

1 Like

Thanks, the library is a JSON file available here

2 Likes

Most excellent tool !

I’ve started adopting it, and do have a couple requests for consideration in the add-on:

  1. Just to reduce to reduce the sense of “one-way / no way back”, it might be nice to include de-install info in the docs.

  2. I’d really prefer it not to change the device icon when I config Battery Notes onto an existing device. (E.g., no longer knowing whether it’s Zigbee or Z-Wave.) Or maybe an option whether icon is to be changed?

  3. My biggest request: Is it possible to change the Battery Notes on a device after that device has been initially configured?

Again, many thanks for a very useful tool addition.

1 Like

Thanks and glad you like the tool.

I guess now it’s getting a little popular I should start an FAQ but to answer your questions directly.

  1. You can always remove a battery note, just go into the Settings > Integrations > Battery Notes, use the menu on the right of a device and select Delete, this will only delete the battery note, not the whole device.

  2. That bugs me as well, unfortunately where there are multiple integrations associated with a device HA seems to choose an icon at random, the same is evident with PowerCalc.

  3. Yes you can edit a note, Go into Settings > Integrations > Battery Notes and click Configure on the device you want to edit.

2 Likes

Most excellent! Thank you so much!

One quick FYI re use cases: I’m also using the Battery Notes to record when I last changed battery. Example: 1X AAA 12/21/23

Again, thanks so much for contributing such a useful tool.

1 Like

A last changed sensor/button/service is on my to do list, but that will be a little while depending on how much free time I get over the Xmas break.

3 Likes

I would like to contribute to the battery database, but don’t know where to do so, thus I am posting it here:

    "manufacturer": "Netatmo",
    "model": "Smart Indoor Module",
    "battery_type": "AAA",
    "battery_quantity": 2

    "manufacturer": "Netatmo",
    "model": "Smart Outdoor Module",
    "battery_type": "AAA",
    "battery_quantity": 2
1 Like

Andrew- I’ve matched up my battery devices with the DB, and have an additional 8 or 9 devices that I can add. But I also found a couple unusual cases:

-I have one device (Mopeka Pro Plus propane monitor) which uses Lithium battery chemistry in AAA form factor. Not sure how to specify battery type.

-I have a device (HomeSeer FS-1000+) that I can install in two different ways: with or without battery. When powered by USB 5V, it does its sensing thing & also serves as Z-Wave repeater. When powered by batteries, it’s just a Z-Wave endpoint sensor. I’m thinking to just do DB entry for battery option. And manually adjust my device info on the USB-powered ones.

-Just FYI, Switchbot has two very different devices which show up in Home Assistant as the exact same character string. (Indoor temp / humid. sensor w display, & Indoor/Outdoor waterproof Hygrometer -which I use in freezers & fridges.) Fortunately for Battery Notes purposes, both devices use exact same batteries.

Do you prefer that device additions be submitted in separate requests, or bundled up into single one?

2 Likes

Thanks Alfred, it normally requires a GitHub pull request but I’ve added this for you.

Hi Tim,

If it absolutely requires a very specific battery I’d suggest AAA Lithium as the battery type.

I’d maybe leave out the HomeSeer if it’s an optional battery and let people add it it manually if they use it battery powered as I guess most will prefer the repeater functionality.

If it’s got the same manufacturer/model/battery that’s all good, I wouldn’t be able to cope with something that didn’t have the same battery so would have to leave that out.

I’m happy for submissions to be bundled or separate, go with what you feel comfortable with, those damn commas and brackets throw so many people, including me!

With version 1.3.3 just released you can now track when batteries were replaced.
A manual button and a service are available for you to reset the replaced date.

2 Likes

I also don’t know how to do it in GitHub, but here is a list for HomeMatic (IP) Devices:

Block9   					= "HM-LC-SW1-BA-PCB|HM-LC-SW4-PCB|HM-LC-SW4-WM|HM-MOD-EM-8|HM-MOD-RE-8|HM-OU-CM-PCB|HM-SEN-RD-O|";
cr2016  					= "HM-RC-4|HM-RC-4-B|HM-RC-KEY3|HM-RC-KEY3-B|HM-RC-P1|HM-RC-SEC3|HM-RC-SEC3-B|ZEL STG RM HS 4|";
cr2032   					= "HM-PB-2-WM|HM-PB-4-WM|HM-PBI-4-FM|HM-SCI-3-FM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M-WDS40-TH-I|HM-WDS40-TH-I-2|HB-UW-SEN-THPL-I|HMIP-ETRV|HMIP-ETRV-2|HMIP-ETRV-C|HMIP-ETRV-C-2|HMIP-SLO|HMIP-SMI|HMIP-SMO|HMIP-SMO-2|HMIP-SMO-A|HMIP-SMO-A-2|HMIP-SPI|HMIP-STHD|HMIP-STHO|HMIP-STHO-A|HMIP-SPDR|HMIP-SWD|ETRV-HMIP-B-UK|HMIP-STE2-PCB|HMIP-WGC|HMIP-STI|";
3 x Mignon AA (LR6)  		= "HM-SEC-MDIR|HM-SEC-MDIR-2|HM-SEC-MDIR-3|HM-SEC-KEY|HM-SEC-KEY-S|HM-SEC-KEY-O|HM-SEC-SD|HM-SEN-MDIR|HM-SEN-MDIR-O|HM-SEN-MDIR-O-2|HM-SEN-WA-OD|HM-WDS100-C6-O|HM-WDS100-C6-O-2|HMIP-ASIR|HMIP-ASIR-B1|HMIP-ASIR-O|HMIP-ASIR-2|HMIP-SWO-B|HMIP-SWO-PL|HMIP-DLD|";
4 x Mignon AA (LR6)    		= "HM-CCU-1|HM-ES-TX-WM|HM-WDC7000|";
Festbatterie (Gerät austauschen)    = "HM-SEC-SD-2|HMIP-SWSD|HMIP-MIO16-PCB|HMIP-PCBS|HMIP-PCBS2|HMIP-PCBS-BAT|HMIP-MOD-RC8|HMIP-MOD-OC8|HMIP-USBSM|HMIP-FWI|HMIP-SFD|ELV-SH-WSC|";
Akku aufladen				= "HM-SEC-WIN|HM-SEC-SFA-SM|";

List is from “Servicemeldungen (per zPNP)”

Unfortunately I need a manufacturer and model as it’s displayed in Home Assistant’s device screen.

What we need to end up with is something like this per device, happy to handle the GitHub insertions.

{
    "manufacturer": "Philips",
    "model": "Hue motion sensor (9290012607)",
    "battery_type": "AAA",
    "battery_quantity": 2
},

Andrew- NICE set of changes in v 1.3.3 !!

I’ve got a question: Is it possible to manually edit the Battery Last Replaced property on a device?

1 Like

Thanks, it’s been good to have a week off of work and get to play with this.

Not without hacking away at some horrible hidden file. I don’t think many will go and guess when they put a battery in so went for the easier approach of letting it be set when you next replace a battery.
A lot of people are talking about making automations that detect a device going to 100% battery and setting the replaced via the service automatically.

OK, thanks; I understand. I had started doing some battery tracking in my manual device-by-device documentation. But only had a few change dates so far. I’ll just hit “Set” on them, & let it treat today as last-change date.

I sort of like the idea to set date automatically when battery level goes to 100%. But I’ll continue to set mine manually, as I’ve seen too much flakiness in device battery level reporting.

Thanks Andrew,

This is a great custom component. Did you or anyone else come up with a card that can display all the information and allow the battery change date? I would like to add it to my system monitor tab.