diff --git a/lib/logitech_receiver/common.py b/lib/logitech_receiver/common.py index bacfc6029a..6fce9c603f 100644 --- a/lib/logitech_receiver/common.py +++ b/lib/logitech_receiver/common.py @@ -567,7 +567,6 @@ class BatteryLevelApproximation(IntEnum): FULL = 90 -@dataclasses.dataclass @dataclasses.dataclass class Battery: """Information about the current state of a battery""" diff --git a/lib/logitech_receiver/notifications.py b/lib/logitech_receiver/notifications.py index bd7a217c0f..8d917ca82b 100644 --- a/lib/logitech_receiver/notifications.py +++ b/lib/logitech_receiver/notifications.py @@ -31,6 +31,8 @@ from . import hidpp20 from . import hidpp20_constants from . import settings_templates +from .common import Alert +from .common import BatteryStatus logger = logging.getLogger(__name__) @@ -331,7 +333,7 @@ def _process_feature_notification(device, n, feature): device.set_battery_info(common.Battery(charge, None, status_text, None)) elif n.address == 0x10: if lux > 200: - status_text = common.BatteryStatus.RECHARGING + status_text = BatteryStatus.RECHARGING device.set_battery_info(common.Battery(charge, None, status_text, None, lux)) elif n.address == 0x20: if logger.isEnabledFor(logging.DEBUG):