src.bluetooth_sig.gatt.characteristics.weight_measurement

Weight Measurement characteristic implementation.

Classes

Name

Description

WeightMeasurementCharacteristic

Weight Measurement characteristic (0x2A9D).

WeightMeasurementData

Parsed weight measurement data.

WeightMeasurementFlags

Weight Measurement flags as per Bluetooth SIG specification.

Module Contents

class src.bluetooth_sig.gatt.characteristics.weight_measurement.WeightMeasurementCharacteristic

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

Weight Measurement characteristic (0x2A9D).

Used to transmit weight measurement data with optional fields. Supports metric/imperial units, timestamps, user ID, BMI, and height.

allow_variable_length: bool = True
max_length: int = 21
min_length: int = 3
class src.bluetooth_sig.gatt.characteristics.weight_measurement.WeightMeasurementData

Bases: msgspec.Struct

Parsed weight measurement data.

bmi: float | None = None
flags: WeightMeasurementFlags
height: float | None = None
height_unit: bluetooth_sig.types.units.HeightUnit | None = None
measurement_units: bluetooth_sig.types.units.MeasurementSystem
timestamp: datetime.datetime | None = None
user_id: int | None = None
weight: float
weight_unit: bluetooth_sig.types.units.WeightUnit
class src.bluetooth_sig.gatt.characteristics.weight_measurement.WeightMeasurementFlags

Bases: enum.IntFlag

Weight Measurement flags as per Bluetooth SIG specification.

BMI_PRESENT = 8
HEIGHT_PRESENT = 16
IMPERIAL_UNITS = 1
TIMESTAMP_PRESENT = 2
USER_ID_PRESENT = 4