Update README.md

This commit is contained in:
M.J. Wydra 2021-08-18 09:57:44 -05:00 committed by GitHub
parent 63704f28d1
commit b34842c24d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
# battery2mqtt
*Push information about batteries in your system to MQTT*
I thought of this project when I switched to using my old laptop as my Home Assistant server. Hopefully others can find it useful as well.
I thought of this project when I switched to using my old laptop as my Home Assistant server. I wanted to track its battery level in Home Assistant to use in automations. Hopefully others can find it useful as well.
# Summary
`battery2mqtt` can monitor current battery percentage, charging status, etc. for any batteries present at `/sys/class/power_supply`. The MQTT topic format is `battery2mqtt/$TOPIC/$NAME` where `$TOPIC` is the topic you define and `$NAME` is the name of each battery. For example, if `/sys/class/power_supply/BAT0` is present in your system and you choose `server` to be the topic, the full topic will be `battery2mqtt/server/BAT0`.