From 49ca3428625903ea493272865113e99d0bf08077 Mon Sep 17 00:00:00 2001 From: jeLee6gi <9397810+jeLee6gi@users.noreply.github.com> Date: Tue, 13 Jan 2026 12:43:20 +0100 Subject: [PATCH] feat(UPowerDevice): report wether AC is online --- ignis/services/upower/device.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ignis/services/upower/device.py b/ignis/services/upower/device.py index 38164654..c0a7790b 100644 --- a/ignis/services/upower/device.py +++ b/ignis/services/upower/device.py @@ -40,6 +40,8 @@ def __init__(self, object_path: str): self.__watch_property("TimeToFull", "time-remaining") self.__watch_property("TimeToEmpty", "time-remaining") + self.__watch_property("Online", "online") + def __watch_property(self, dbus_property: str, *prop_names: str) -> None: self.__watching_props[dbus_property] = prop_names @@ -92,6 +94,13 @@ def available(self) -> bool: """ return self._proxy.IsPresent + @IgnisProperty + def online(self) -> bool: + """ + Whether the device is online. + """ + return self._proxy.Online + @IgnisProperty def percent(self) -> float: """