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

12 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-11 20:14 +0000

1"""DST Offset characteristic implementation.""" 

2 

3from __future__ import annotations 

4 

5from enum import IntEnum 

6 

7from .base import BaseCharacteristic 

8from .templates import EnumTemplate 

9 

10 

11class DSTOffset(IntEnum): 

12 """DST Offset enumeration values.""" 

13 

14 STANDARD_TIME = 0 

15 HALF_HOUR_DAYLIGHT = 2 

16 DAYLIGHT_TIME = 4 

17 DOUBLE_DAYLIGHT = 8 

18 UNKNOWN = 255 

19 

20 

21class DstOffsetCharacteristic(BaseCharacteristic[int]): 

22 """DST Offset characteristic (0x2A0D). 

23 

24 org.bluetooth.characteristic.dst_offset 

25 

26 Represents the Daylight Saving Time offset as an 8-bit enumeration. 

27 """ 

28 

29 _template = EnumTemplate.uint8(DSTOffset)