Coverage for src/bluetooth_sig/gatt/characteristics/methane_concentration.py: 100%
10 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-30 00:10 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-30 00:10 +0000
1"""Methane Concentration characteristic implementation."""
3from __future__ import annotations
5from ...types.gatt_enums import ValueType
6from .base import BaseCharacteristic
7from .templates import ConcentrationTemplate
10class MethaneConcentrationCharacteristic(BaseCharacteristic):
11 """Methane concentration measurement characteristic (0x2BD1).
13 Represents methane concentration in parts per million (ppm) with a
14 resolution of 1 ppm.
15 """
17 _template = ConcentrationTemplate()
19 _manual_value_type: ValueType | str | None = "int"
20 _manual_unit: str = "ppm" # Override template's "ppm" default
22 # Template configuration
23 resolution: float = 1.0
24 max_value: float = 65533.0 # Exclude special values 0xFFFE and 0xFFFF