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

5 statements  

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

1"""Percentage 8 Steps characteristic (0x2C05).""" 

2 

3from __future__ import annotations 

4 

5from .base import BaseCharacteristic 

6from .templates import Uint8Template 

7 

8 

9class Percentage8StepsCharacteristic(BaseCharacteristic[int]): 

10 """Percentage 8 Steps characteristic (0x2C05). 

11 

12 org.bluetooth.characteristic.percentage_8_steps 

13 

14 Number of steps from minimum to maximum value. 

15 M=1, d=0, b=0 — no scaling; plain unsigned 8-bit integer. 

16 Range: 1-200 (unitless). 

17 A value of 0xFF represents 'value is not known'. 

18 

19 Raises: 

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

21 """ 

22 

23 _template = Uint8Template()