Coverage for src/bluetooth_sig/gatt/services/battery_service.py: 100%
6 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-30 00:10 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-30 00:10 +0000
1"""Battery Service implementation."""
3from __future__ import annotations
5from typing import ClassVar
7from ..characteristics.registry import CharacteristicName
8from .base import BaseGattService
11class BatteryService(BaseGattService):
12 """Battery Service implementation.
14 Contains characteristics related to battery information:
15 - Battery Level - Required
16 - Battery Level Status - Optional
17 """
19 service_characteristics: ClassVar[dict[CharacteristicName, bool]] = {
20 CharacteristicName.BATTERY_LEVEL: True, # required
21 CharacteristicName.BATTERY_LEVEL_STATUS: False, # optional
22 }