battery service: add energy rate known-or-not status

This commit is contained in:
end-4
2026-03-08 18:16:31 +01:00
parent 6b08e16222
commit dd0b8a5114
@@ -11,6 +11,7 @@ Singleton {
id: root
property bool available: UPower.displayDevice.isLaptopBattery
property var chargeState: UPower.displayDevice.state
property bool knownEnergyRate: energyRate != 0 && (chargeState == UPowerDeviceState.Charging || chargeState == UPowerDeviceState.Discharging)
property bool isCharging: chargeState == UPowerDeviceState.Charging
property bool isPluggedIn: isCharging || chargeState == UPowerDeviceState.PendingCharge
property real percentage: UPower.displayDevice?.percentage ?? 1