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

6 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-11 20:14 +0000

1"""VOC Concentration characteristic implementation.""" 

2 

3from __future__ import annotations 

4 

5from .base import BaseCharacteristic 

6from .templates import Uint16Template 

7 

8 

9class VOCConcentrationCharacteristic(BaseCharacteristic[int]): 

10 """Volatile Organic Compounds concentration characteristic (0x2BE7). 

11 

12 Uses uint16 format as per SIG specification. 

13 Unit: ppb (parts per billion) 

14 Range: 0-65535 (uint16) 

15 Special values per SIG spec: 0xFFFE (≥65534 ppb), 0xFFFF (value not known) 

16 """ 

17 

18 _template = Uint16Template() 

19 

20 _manual_unit: str | None = "ppb" # Unit as per SIG specification