From 48e36a290f994d479dea2c7f237c5b532d1c7e19 Mon Sep 17 00:00:00 2001 From: lich Date: Wed, 24 Jan 2018 20:51:46 +0800 Subject: [PATCH] Add system option for linux_battery.py, Support android. (#4504) * Add system option for linux_battery.py, Support android. * Use new style for configuration variables --- .../_components/sensor.linux_battery.markdown | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/source/_components/sensor.linux_battery.markdown b/source/_components/sensor.linux_battery.markdown index 08c9fca5864..13fc3d3e2f6 100644 --- a/source/_components/sensor.linux_battery.markdown +++ b/source/_components/sensor.linux_battery.markdown @@ -13,7 +13,7 @@ ha_release: 0.28 ha_iot_class: "Local Polling" --- -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. +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: @@ -23,8 +23,20 @@ sensor: - platform: linux_battery ``` -Configuration variables: - -- **name** (*Optional*): Friendly name to use for the frontend. Default to "Battery". -- **battery** (*Optional*): Number of the battery. Default to `1`. - +{% configuration %} +name: + description: Friendly name to use for the frontend. + required: false + default: Battery + type: string +battery: + description: Number of the battery. + required: false + default: 1 + type: integer +system: + description: "The local system type. Support `linux` and `android`." + required: false + default: linux + type: string +{% endconfiguration %}