Skip to content

Check isPresent when cumulating battery data

Fushan Wen requested to merge work/fuf/present into master

Some batteries are hot-removable, so it's also necessary to check the property.

"is-present" is not necessarily bound to "power-supply". as can be seen in https://gitlab.freedesktop.org/upower/upower/-/commit/d74536fa0ede7822f2db671a5e1785121d5b1946 and the energy properties are only reset when it's coldplugged (up_device_supply_coldplug).

Merge request reports