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

10 statements  

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

1# pylint: disable=duplicate-code # Concentration characteristics share template configuration 

2"""Ozone Concentration characteristic implementation.""" 

3 

4from __future__ import annotations 

5 

6from ...types.gatt_enums import ValueType 

7from .base import BaseCharacteristic 

8from .templates import ConcentrationTemplate 

9 

10 

11class OzoneConcentrationCharacteristic(BaseCharacteristic): 

12 """Ozone concentration measurement characteristic (0x2BD4). 

13 

14 Represents ozone concentration in parts per billion (ppb) with a 

15 resolution of 1 ppb. 

16 """ 

17 

18 _template = ConcentrationTemplate() 

19 

20 _manual_value_type: ValueType | str | None = ValueType.INT # Manual override needed as no YAML available 

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

22 

23 # Template configuration 

24 resolution: float = 1.0 

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