Giter Site home page Giter Site logo

ikarus-71 / ha-battery-notes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andrew-codechimp/ha-battery-notes

0.0 0.0 0.0 491 KB

A Home Assistant integration to provide battery notes of devices

License: MIT License

Shell 2.43% Python 97.57%

ha-battery-notes's Introduction

Home Assistant Battery Notes

GitHub Release GitHub Activity License

hacs

Community Forum

Integration to add battery notes to a device, with automatic discovery via a growing battery library for devices

Please โญ this repo if you find it useful

Battery Notes

This integration will set up the following platforms.

Platform Description
sensor Show battery type.

Installation

HACS

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.

Restart Home Assistant

Important

Add the following entry to your configuration.yaml

battery_notes:

Restart Home Assistant a final time In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Battery Notes"

Manual Installation

Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml). If you do not have a custom_components directory (folder) there, you need to create it. In the custom_components directory (folder) create a new folder called battery_notes. Download all the files from the custom_components/battery_notes/ directory (folder) in this repository. Place the files you downloaded in the new directory (folder) you created. Restart Home Assistant Add the following entry to your configuration.yaml

battery_notes:

Restart Home Assistant a final time In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Battery Notes"

Configuration is done in the UI

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 diagnostic sensor on the device.

Automatic discovery

Battery Notes will automatically discover devices (as long as you have followed the installation instructions above) that it has in its library and create a notification to add a battery note. Discovery

If you wish to disable this functionality then change your configuration.yaml to set enable_autodiscovery to false

battery_notes:
  enable_autodiscovery: false

Contributing to the Battery Library

Fork the repository, add your device details to the JSON document custom_components/battery_notes/data/library.json, and then submit a pull request.

  • 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.
  • Please keep devices in alphabetical order by manufacturer/model.
  • The battery_quantity data is numeric (no quotes) and optional. If a device only requires a single battery, it should be omitted.
  • The battery_type data should follow the most common naming for general batteries (ex. AAA, D) and the IEC naming for battery cells according to Wikipedia (ex. CR2032, 18650)
  • If a device has a bespoke rechargeable battery you can use "battery_type": "Rechargeable"
  • For devices like smoke alarms where the battery is not replaceable you can use "battery_type": "Irreplaceable"

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
},

Device Details

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.

Thanks to everyone who has submitted devices to the library.

ha-battery-notes's People

Contributors

andrew-codechimp avatar dependabot[bot] avatar bmos avatar kaosmagix avatar dankarization avatar dakael avatar djbac avatar ff0205 avatar p-v-d avatar pjanssen avatar timoainali avatar wendelfelius avatar deosrc avatar jangelgon avatar 4d4m-github avatar bartkummel avatar cs42 avatar cgallred avatar codyc1515 avatar coolid2 avatar edouardkleinhans avatar emilianox avatar gionaf avatar jaudi23 avatar cdrfun avatar animalillo avatar mmalolepszy avatar mihsu81 avatar askpatrickw avatar ragetti13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.