Skip to content

andrew-codechimp/HA-Battery-Notes

Repository files navigation

Battery Notes for Home Assistant

GitHub Release GitHub Activity Downloads License hacs

Integration to add battery notes to a device or entity, with automatic discovery via a growing battery library for devices.
Track the battery type, when the battery was replaced, when a battery is low based on device or global thresholds and also when a battery hasn't been reported for a while.

Dashboard cards usage

A battery+ sensor provides useful attributes for easy use in dashboards, the standard battery can optionally be hidden.

Notifications and automations

Battery low, replaced and not reported are all exposed via events and actions, using these you can create your own automations to generate notifications or other actions, there are some predefined ones in community.

Please ⭐ this repo if you find it useful
If you want to show your support please

"Buy Me A Coffee"

Battery Notes

Discovery

Installation

Important

Once you have installed battery notes using either HACS or manually as per the instructions below you must add the following entry to your configuration.yaml, then restart Home Assistant. This will enable discovery of your devices.

battery_notes:

If you need to add a device that is not automatically discovered from the library go to Settings -> Integrations click "+" and search for "Battery Notes"

HACS Installation

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Or Search for Battery Notes in HACS and install it under the "Integrations" category.

Manual Installation

More Details
  • You should take the battery_notes.zip file from the latest published release.
  • To install, place the contents of custom_components into the <config directory>/custom_components folder of your Home Assistant installation.
  • Add the following entry to your configuration.yaml
battery_notes:
  • Restart Home Assistant
  • In the HA UI go to Settings -> Integrations click "+" and search for "Battery Notes"

Docs

To get full use of the integration, read the documentation. It contains community quick starts as well as details on all the actions, events and entities.

"Documentation"

Contributing to the Battery Library

"New Device Request"

To add a device definition to the battery library so that it will be automatically configured fill out the above form or see the docs for adding via pull request.

Translations

To add a new language translation to Battery Notes see here

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines.

Acknowledgements

A lot of the inspiration for this integration came from the excellent PowerCalc by bramstroker, without adapting code from PowerCalc I'd never have worked out how to add additional sensors to a device.

Huge thanks to @bmos for creating the issue form & automations for adding new devices.

Thanks to everyone who has submitted devices to the library.