src.bluetooth_sig.gatt.characteristics.battery_health_status¶
Battery Health Status characteristic implementation.
Implements the Battery Health Status characteristic (0x2BEA) from the Battery Service. An 8-bit flags field controls the presence of four optional fields.
All flag bits use normal logic (1 = present, 0 = absent).
References
Bluetooth SIG Battery Service 1.1 org.bluetooth.characteristic.battery_health_status (GSS YAML)
Classes¶
Name | Description |
|---|---|
Parsed data from Battery Health Status characteristic. |
|
Battery Health Status characteristic (0x2BEA). |
|
Battery Health Status flags as per Bluetooth SIG specification. |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.battery_health_status.BatteryHealthStatus¶
Bases:
msgspec.StructParsed data from Battery Health Status characteristic.
- flags¶
Raw 8-bit flags field.
- battery_health_summary¶
Percentage 0-100 representing overall health. None if absent.
- cycle_count¶
Number of charge cycles. None if absent.
- current_temperature¶
Current temperature in degrees Celsius. 127 means “>126”, -128 means “<-127”. None if absent.
- deep_discharge_count¶
Number of complete discharges. None if absent.
- flags: BatteryHealthStatusFlags¶
- class src.bluetooth_sig.gatt.characteristics.battery_health_status.BatteryHealthStatusCharacteristic(info: src.bluetooth_sig.types.CharacteristicInfo | None = None, validation: src.bluetooth_sig.gatt.characteristics.characteristic_meta.ValidationConfig | None = None)¶
Bases:
src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[BatteryHealthStatus]Battery Health Status characteristic (0x2BEA).
Reports battery health information including summary percentage, cycle count, temperature, and deep discharge count.
- Flag-bit assignments (from GSS YAML):
Bit 0: Battery Health Summary Present Bit 1: Cycle Count Present Bit 2: Current Temperature Present Bit 3: Deep Discharge Count Present Bits 4-7: Reserved for Future Use
- expected_type¶