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

16 statements  

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

1"""Audio Input Type characteristic (0x2B79).""" 

2 

3from __future__ import annotations 

4 

5from enum import IntEnum 

6 

7from .base import BaseCharacteristic 

8from .templates import EnumTemplate 

9 

10 

11class AudioInputType(IntEnum): 

12 """Audio input type.""" 

13 

14 UNSPECIFIED = 0x00 

15 BLUETOOTH = 0x01 

16 MICROPHONE = 0x02 

17 ANALOG = 0x03 

18 DIGITAL = 0x04 

19 RADIO = 0x05 

20 STREAMING = 0x06 

21 AMBIENT = 0x07 

22 

23 

24class AudioInputTypeCharacteristic(BaseCharacteristic[AudioInputType]): 

25 """Audio Input Type characteristic (0x2B79). 

26 

27 org.bluetooth.characteristic.audio_input_type 

28 

29 Type of audio input. 

30 """ 

31 

32 expected_length: int = 1 

33 _template = EnumTemplate.uint8(AudioInputType)