add option to show power units

This commit is contained in:
M.J. Wydra
2020-12-05 16:18:42 -06:00
parent 43c23b7af9
commit 6472dc534f
3 changed files with 31 additions and 7 deletions

View File

@@ -36,6 +36,7 @@ services:
- MONITORED_CONDITIONS=status,capacity
- BATTERY_HEALTH=1
- TIME_REMAINING=1
- SHOW_UNITS=1
volumes:
- /sys/class/power_supply:/sys/class/power_supply:ro
restart: unless-stopped
@@ -54,12 +55,13 @@ services:
| `MONITORED_CONDITIONS` | (See below) | Battery properties to send to MQTT (must be a comma-separated string.) |
| `BATTERY_HEALTH` | `1` | Set to 1 to enable battery health percentage calculation or 0 to disable. |
| `TIME_REMAINING` | `1` | Set to 1 to enable time remaining estimate (in hours) or 0 to disable. |
| `SHOW_UNITS` | `1` | Set to 1 to show power units in the MQTT payload or 0 to disable. |
# Monitored conditions
You can specify only those conditions that you'd like to track. The default is to track `alarm, capacity, capacity_level, present, status, and voltage_now`. You can add more conditions (found at `/sys/class/power_supply/$NAME`) or choose only those you want to track. The variable in your `docker-compose.yaml` must follow this format:
You can specify only those conditions that you'd like to track. The default is to track `status, capacity, energy_now, energy_full, energy_full_design, power_now, voltage_now`. You can add more conditions (found at `/sys/class/power_supply/$NAME`) or choose only those you want to track. The variable in your `docker-compose.yaml` must follow this comma-separated format:
```
alarm,capacity,capacity_level,present,status,voltage_now
status,capacity,energy_now,energy_full,energy_full_design,power_now,voltage_now
```
# Battery health and time remaining calculations