Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add details of battery library (coming soon!)
  • Loading branch information
andrew-codechimp authored Dec 10, 2023
1 parent 5d5ba96 commit 6ebc878
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,37 @@ In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "B
On the "Configuration" -> "Integrations" -> "Battery Notes" screen add a new device, pick your device with a battery and add the battery type.
The battery type will then be displayed as a diagnotic sensor on the device.

## Contributing to the Battery Library (COMING SOON!)

The battery library is a JSON document at ```custom_components/battery_notes/data/library.json```
To contribute, fork the repository, add your device details to the JSON document and submit a pull request.
Please keep devices in alphabetical order by manufacturer/model.
The manufacturer and model should be exactly what is displayed on the Device screen within Home Assistant. The make & model names may be different between integrations such as Zigbee2MQTT and ZHA, if you see a similar device please duplicate the entry rather than changing it.

For the example image below your JSON entry will look like this

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

Note that the ```battery_quantity``` is numeric (no quotes) and optional, if a device only has one battery it should be omitted.

![Device Details](https://github.com/andrew-codechimp/HA-Battery-Notes/blob/main/images/screenshot-device-info.png "Device Details")
<!---->

## Contributions are welcome!

If you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md)

## Acknowledgements

A lot of the inspiration for this integration came from the excellent [PowerCalc by bramstroker](https://github.com/bramstroker/homeassistant-powercalc), without adapting code from PowerCalc I'd never have worked out how to add additional sensors to a device.

***

[battery_notes]: https://github.com/andrew-codechimp/HA-Battery-Notes
Expand Down

0 comments on commit 6ebc878

Please sign in to comment.