Coverage for src / bluetooth_sig / gatt / characteristics / power.py: 100%
5 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
1"""Power characteristic (0x2B05)."""
3from __future__ import annotations
5from .base import BaseCharacteristic
6from .templates import ScaledUint24Template
9class PowerCharacteristic(BaseCharacteristic[float]):
10 """Power characteristic (0x2B05).
12 org.bluetooth.characteristic.power
14 Power in watts with a resolution of 0.1.
15 M=1, d=-1, b=0 → scale factor 0.1.
16 Range: 0-1677721.3 W. A value of 0xFFFFFE represents 'value is not valid'.
18 Raises:
19 SpecialValueDetectedError: If raw value is a sentinel (e.g. 0xFFFFFE).
20 """
22 _template = ScaledUint24Template.from_letter_method(M=1, d=-1, b=0)