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

7 statements  

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

1"""Emergency Text characteristic (0x2B2E).""" 

2 

3from __future__ import annotations 

4 

5from .base import BaseCharacteristic 

6from .templates import Utf8StringTemplate 

7 

8 

9class EmergencyTextCharacteristic(BaseCharacteristic[str]): 

10 """Emergency Text characteristic (0x2B2E). 

11 

12 org.bluetooth.characteristic.emergency_text 

13 

14 1-20 octets of UTF-8 encoded text (no null terminator). Intended to 

15 carry human-readable information such as a name or phone number. 

16 Encryption required. 

17 """ 

18 

19 _template = Utf8StringTemplate() 

20 min_length: int = 1 

21 max_length: int = 20