src.bluetooth_sig.gatt.characteristics.local_time_information

Local Time Information characteristic implementation.

Classes

Name

Description

DSTOffset

DST offset values as an IntEnum to avoid magic numbers.

DSTOffsetInfo

DST offset information part of local time data.

LocalTimeInformationCharacteristic

Local Time Information characteristic (0x2A0F).

LocalTimeInformationData

Parsed data from Local Time Information characteristic.

TimezoneInfo

Timezone information part of local time data.

Module Contents

class src.bluetooth_sig.gatt.characteristics.local_time_information.DSTOffset

Bases: enum.IntEnum

DST offset values as an IntEnum to avoid magic numbers.

Values correspond to the Bluetooth SIG encoded DST offset values.

DAYLIGHT = 4
DOUBLE_DAYLIGHT = 8
HALF_HOUR = 2
STANDARD = 0
UNKNOWN = 255
property description: str

Human-readable description for this DST offset value.

property offset_hours: float | None

Return the DST offset in hours (e.g. 0.5 for half hour), or None if unknown.

class src.bluetooth_sig.gatt.characteristics.local_time_information.DSTOffsetInfo

Bases: msgspec.Struct

DST offset information part of local time data.

description: str
offset_hours: float | None
raw_value: int
class src.bluetooth_sig.gatt.characteristics.local_time_information.LocalTimeInformationCharacteristic

Bases: src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[LocalTimeInformationData]

Local Time Information characteristic (0x2A0F).

org.bluetooth.characteristic.local_time_information

Local time information characteristic.

Represents the relation (offset) between local time and UTC. Contains time zone and Daylight Savings Time (DST) offset information.

expected_length: int = 2
class src.bluetooth_sig.gatt.characteristics.local_time_information.LocalTimeInformationData

Bases: msgspec.Struct

Parsed data from Local Time Information characteristic.

dst_offset: DSTOffsetInfo
timezone: TimezoneInfo
total_offset_hours: float | None = None
class src.bluetooth_sig.gatt.characteristics.local_time_information.TimezoneInfo

Bases: msgspec.Struct

Timezone information part of local time data.

description: str
offset_hours: float | None
raw_value: int