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

11 statements  

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

1"""Mute characteristic.""" 

2 

3from __future__ import annotations 

4 

5from enum import IntEnum 

6 

7from .base import BaseCharacteristic 

8from .templates import EnumTemplate 

9 

10 

11class MuteState(IntEnum): 

12 """Mute state (MICS v1.0, Section 3.1).""" 

13 

14 NOT_MUTED = 0x00 

15 MUTED = 0x01 

16 DISABLED = 0x02 

17 

18 

19class MuteCharacteristic(BaseCharacteristic[MuteState]): 

20 """Mute characteristic (0x2BC3). 

21 

22 org.bluetooth.characteristic.mute 

23 

24 Indicates whether the device is muted (1) or not muted (0). 

25 """ 

26 

27 expected_length: int = 1 

28 _template = EnumTemplate.uint8(MuteState)