feat: add support for multiple batteries in a single bluetooth device

This commit is contained in:
Antoine Gaudreau Simard
2026-05-13 11:48:42 -04:00
parent 05945748dc
commit 3971bb6c00
3 changed files with 168 additions and 3 deletions
+14
View File
@@ -178,6 +178,9 @@ At the time of writing, the experimental features of BlueZ need to be turned on,
*{device_battery_percentage}*: Battery percentage of the displayed device if available. Use only in the config options defined below.
*{device_battery_percentage_peripheral}*: Battery percentage of the peripheral half of a split keyboard (e.g., ZMK keyboards with separate central and peripheral batteries). ++
This is read from GATT Battery Service characteristics that have a User Description descriptor. Use only in the config options defined below.
## CONFIGURATION
*format-connected-battery*: ++
@@ -220,6 +223,17 @@ At the time of writing, the experimental features of BlueZ need to be turned on,
}
```
Split keyboard with separate central/peripheral batteries (e.g., ZMK):
```
"bluetooth": {
"format-device-preference": [ "Keyball44" ],
"format": "",
"format-connected-battery": " {device_battery_percentage}%|{device_battery_percentage_peripheral}%",
"tooltip-format-connected": "{device_alias}\\nCentral: {device_battery_percentage}%\\nPeripheral: {device_battery_percentage_peripheral}%"
}
```
# STYLE
- *#bluetooth*