Coverage for src/bluetooth_sig/gatt/services/weight_scale.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-10-30 00:10 +0000

1"""Weight Scale Service implementation.""" 

2 

3from __future__ import annotations 

4 

5from typing import ClassVar 

6 

7from ..characteristics.registry import CharacteristicName 

8from .base import BaseGattService 

9 

10 

11class WeightScaleService(BaseGattService): 

12 """Weight Scale Service implementation (0x181D). 

13 

14 Used for smart scale devices that measure weight and related body 

15 metrics. Contains Weight Measurement and Weight Scale Feature 

16 characteristics. 

17 """ 

18 

19 service_characteristics: ClassVar[dict[CharacteristicName, bool]] = { 

20 CharacteristicName.WEIGHT_MEASUREMENT: True, # required 

21 CharacteristicName.WEIGHT_SCALE_FEATURE: False, # optional 

22 }