Skip to content

Commit

Permalink
Merge branch 'master' into testable_interface
Browse files Browse the repository at this point in the history
  • Loading branch information
MattHag authored May 23, 2024
2 parents 2408c0b + 815dce0 commit aa2efe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/logitech_receiver/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ class BatteryLevelApproximation(IntEnum):
FULL = 90


@dataclasses.dataclass
@dataclasses.dataclass
class Battery:
"""Information about the current state of a battery"""
Expand Down
4 changes: 3 additions & 1 deletion lib/logitech_receiver/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit aa2efe9

Please sign in to comment.