oriionn / ha-battery-level

Get your battery level on Home Assistant
MIT License
2 stars 0 forks source link
battery home-assistant homeassistant

Home Assistant Battery Level

Home Assistant Battery Level

This is a simple software that will check the battery level of your computer et send it to Home Assistant.

Compatibility

OS Normally Tested
Linux
Windows
MacOS

Installation

Simply download the latest release and run the executable.

Configuration

  1. Create a new sensor in Home Assistant (template type)

Settings then services then sensors then create a new sensor then choose template type then choose non binary template then create it

  1. Create a access token in Home Assistant

User profile then security then create a new token then create it

  1. Run the software, a error will appear

Error

  1. Open the file path that is in the error message (Listed here)

Open the file path

  1. Edit the file with your Home Assistant informations and save it (Interval is in seconds)

Edit the file

  1. Run the software again, it should work
  2. Add the sensor to your dashboard (Entity Card)

Config paths

Development

Prerequisites

Building

  1. Clone the repository
    git clone https://github.com/oriionn/ha-battery-level.git
  2. Change directory
    cd ha-battery-level

Windows

go build -ldflags -H=windowsgui

Linux and MacOS

go build

Credits

License

This project is licensed under the MIT License - see the LICENSE file for details.