Linux Battery

The linux_battery sensor integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] 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.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file. After changing the configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file, restart Home Assistant to apply the changes. The integration is now shown on the integrations page under Settings > Devices & services. Its entities are listed on the integration card itself and on the Entities tab.

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

Configuration Variables

name string (Optional, default: Battery)

Friendly name to use for the frontend.

battery integer (Optional, default: 1)

Number of the battery.

system string (Optional, default: linux)

The local system type. Support linux and android.