Coverage for src/bluetooth_sig/gatt/characteristics/uv_index.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-10-30 00:10 +0000

1"""UV Index characteristic implementation.""" 

2 

3from __future__ import annotations 

4 

5from .base import BaseCharacteristic 

6from .templates import Uint8Template 

7 

8 

9class UVIndexCharacteristic(BaseCharacteristic): 

10 """UV Index characteristic (0x2A76). 

11 

12 org.bluetooth.characteristic.uv_index 

13 

14 UV Index characteristic. 

15 """ 

16 

17 _template = Uint8Template() 

18 

19 _characteristic_name: str = "UV Index" 

20 # YAML provides uint8 -> int, which is correct for UV Index values (0-11+ scale)