mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +00:00
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
This commit is contained in:
parent
1edf68ff68
commit
48e36a290f
@ -13,7 +13,7 @@ ha_release: 0.28
|
|||||||
ha_iot_class: "Local Polling"
|
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:
|
To setup a battery sensor to your installation, add the following to your `configuration.yaml` file:
|
||||||
|
|
||||||
@ -23,8 +23,20 @@ sensor:
|
|||||||
- platform: linux_battery
|
- platform: linux_battery
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
name:
|
||||||
- **name** (*Optional*): Friendly name to use for the frontend. Default to "Battery".
|
description: Friendly name to use for the frontend.
|
||||||
- **battery** (*Optional*): Number of the battery. Default to `1`.
|
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 %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user