report Online status of UPS devices
Submitted by Sam Hanes
Assigned to Richard Hughes @hughsient
Link to original bug (#103500)
Description
At present (v0.99.6 / 2dd321fa) UPower doesn't expose the online status (whether mains power is connected) for USB HID UPS devices at all. It would be useful to have that data.
The state property on a UPS device can show charging, discharging, or full, but that doesn't respond fast enough to the loss of mains power. On my UPS, it can take up to five minutes after loss of mains power for the state to change from full to discharging (that may be a bug, not sure). For my application I need to be notified immediately on loss of mains power, or at least on the next poll. Besides, I would prefer to display the actual mains status and not infer it from the state of the battery.
I'm happy to submit a patch, but as there are a bunch of different ways the online status could be exposed (e.g. via the Online property on the existing UPS device, via a new line device, etc.) I want to get the concept approved and design reviewed before I start work on one.