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

6 statements  

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

1"""Time Decihour 8 characteristic (0x2B12).""" 

2 

3from __future__ import annotations 

4 

5from datetime import timedelta 

6 

7from .base import BaseCharacteristic 

8from .templates import TimeDurationTemplate 

9 

10 

11class TimeDecihour8Characteristic(BaseCharacteristic[timedelta]): 

12 """Time Decihour 8 characteristic (0x2B12). 

13 

14 org.bluetooth.characteristic.time_decihour_8 

15 

16 Time in hours with a resolution of 0.1 (deci-hours). 

17 M=1, d=-1, b=0 → scale factor 0.1. 

18 Range: 0.0-23.9. A value of 0xFF represents 'value is not known'. 

19 

20 Raises: 

21 SpecialValueDetectedError: If raw value is a sentinel (e.g. 0xFF). 

22 """ 

23 

24 _template = TimeDurationTemplate.decihours_uint8()