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

5 statements  

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

1"""Energy 32 characteristic (0x2AF2).""" 

2 

3from __future__ import annotations 

4 

5from .base import BaseCharacteristic 

6from .templates import Uint32Template 

7 

8 

9class Energy32Characteristic(BaseCharacteristic[int]): 

10 """Energy 32 characteristic (0x2AF2). 

11 

12 org.bluetooth.characteristic.energy_32 

13 

14 Energy in watt-hours with a resolution of 1 Wh. 

15 A value of 0xFFFFFFFE represents 'value is not valid'. 

16 A value of 0xFFFFFFFF represents 'value is not known'. 

17 

18 Raises: 

19 SpecialValueDetectedError: If raw value is a sentinel (e.g. 0xFFFFFFFF). 

20 """ 

21 

22 _template = Uint32Template()