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

9 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-03 16:41 +0000

1"""Analog characteristic (0x2A58).""" 

2 

3from __future__ import annotations 

4 

5from ...types import CharacteristicInfo 

6from ...types.uuid import BluetoothUUID 

7from .base import BaseCharacteristic 

8from .templates import Uint16Template 

9 

10 

11class AnalogCharacteristic(BaseCharacteristic[int]): 

12 """Analog characteristic (0x2A58). 

13 

14 org.bluetooth.characteristic.analog 

15 

16 Represents one analog signal value as an unsigned 16-bit integer. 

17 """ 

18 

19 _template = Uint16Template() 

20 expected_length = 2 

21 # TODO Remove once uuid is added to yaml files 

22 _info = CharacteristicInfo( 

23 uuid=BluetoothUUID(0x2A58), 

24 name="Analog", 

25 id="org.bluetooth.characteristic.analog", 

26 unit="", 

27 )