Coverage for src/bluetooth_sig/gatt/services/cookware.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.14.3, created at 2026-06-28 01:26 +0000

1"""Cookware Service implementation.""" 

2 

3from __future__ import annotations 

4 

5from typing import ClassVar 

6 

7from ..characteristics.registry import CharacteristicName 

8from .base import BaseGattService 

9 

10 

11class CookwareService(BaseGattService): 

12 """Cookware Service implementation (0x185D). 

13 

14 Per Cookware Service spec Table 3.1: 

15 - Mandatory: Cookware Description, Cookware Sensor Data 

16 - Conditional (C.1/C.2): recipe/zone characteristics when control loop or 

17 multiple sensors apply — modeled as optional for discovery validation 

18 """ 

19 

20 service_characteristics: ClassVar[dict[CharacteristicName, bool]] = { 

21 CharacteristicName.COOKWARE_DESCRIPTION: True, 

22 CharacteristicName.COOKWARE_SENSOR_DATA: True, 

23 CharacteristicName.RECIPE_PARAMETERS: False, 

24 CharacteristicName.RECIPE_CONTROL: False, 

25 CharacteristicName.COOKING_STEP_STATUS: False, 

26 CharacteristicName.COOKING_ZONE_CAPABILITIES: False, 

27 CharacteristicName.COOKING_ZONE_DESIRED_COOKING_CONDITIONS: False, 

28 CharacteristicName.COOKING_ZONE_ACTUAL_COOKING_CONDITIONS: False, 

29 CharacteristicName.COOKWARE_SENSOR_AGGREGATE: False, 

30 }