Coverage for src / bluetooth_sig / gatt / characteristics / pollen_concentration.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-18 11:17 +0000

1"""Pollen Concentration characteristic implementation.""" 

2 

3from __future__ import annotations 

4 

5from .base import BaseCharacteristic 

6from .templates import ScaledUint24Template 

7 

8 

9class PollenConcentrationCharacteristic(BaseCharacteristic[float]): 

10 """Pollen concentration measurement characteristic (0x2A75). 

11 

12 Uses uint24 (3 bytes) format as per SIG specification. 

13 Unit: grains/m³ (count per cubic meter) 

14 """ 

15 

16 _template = ScaledUint24Template(scale_factor=1.0) 

17 

18 _manual_unit: str = "grains/m³" # Override template's "units" default 

19 

20 # SIG specification configuration 

21 resolution: float = 1.0