Feat: Peripheral status and integration #140
@@ -145,7 +145,7 @@ def _process_battery_notification(dev, n) -> bool:
|
||||
|
||||
if feature == SupportedFeature.SOLAR_DASHBOARD:
|
||||
if n.data[5:9] == b"GOOD":
|
||||
charge, lux, adc = struct.unpack("!BHH", n.data[:5])
|
||||
charge, lux, _ = struct.unpack("!BHH", n.data[:5])
|
||||
status = BatteryStatus.DISCHARGING
|
||||
if n.address == 0x10 and lux > 200:
|
||||
status = BatteryStatus.RECHARGING
|
||||
@@ -437,7 +437,7 @@ class _ListenerRegistry:
|
||||
is None
|
||||
):
|
||||
for (
|
||||
other_path,
|
||||
_,
|
||||
(other_obj, _other_listener),
|
||||
) in self._entries.items():
|
||||
if other_obj.isDevice:
|
||||
|
||||
Reference in New Issue
Block a user