Linux Battery


The linux_battery sensor platform is using the information stored in /sys/class/power_supply/ on your local Linux system to display details about the current state of your battery.

To setup a battery sensor to your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
sensor:
  - platform: linux_battery

Configuration Variables

name

(string)(Optional)

Friendly name to use for the frontend.

Default value:

Battery

battery

(integer)(Optional)

Number of the battery.

Default value:

1

system

(string)(Optional)

The local system type. Support linux and android.

Default value:

linux