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

8 statements  

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

1"""Nitrogen Dioxide Concentration characteristic implementation.""" 

2 

3from __future__ import annotations 

4 

5from .base import BaseCharacteristic 

6from .templates import ConcentrationTemplate 

7 

8 

9class NitrogenDioxideConcentrationCharacteristic(BaseCharacteristic): 

10 """Nitrogen dioxide concentration measurement characteristic (0x2BD2). 

11 

12 Represents nitrogen dioxide (NO2) concentration in parts per billion 

13 (ppb) with a resolution of 1 ppb. 

14 """ 

15 

16 _template = ConcentrationTemplate() 

17 

18 _manual_unit: str = "ppb" # Override template's "ppm" default 

19 

20 # Template configuration 

21 resolution: float = 1.0 

22 max_value: float = 65533.0 # Exclude special values 0xFFFE and 0xFFFF