17
17
from zigpy .zcl .foundation import BaseAttributeDefs , ZCLAttributeDef , ZCLCommandDef
18
18
19
19
"""Bosch specific thermostat attribute ids."""
20
+
21
+ # Mode of operation with values BoschOperatingMode.
20
22
OPERATING_MODE_ATTR_ID = 0x4007
23
+
24
+ # Valve position: 0% - 100%
21
25
VALVE_POSITION_ATTR_ID = 0x4020
26
+
27
+ # Remote measured temperature.
22
28
REMOTE_TEMPERATURE_ATTR_ID = 0x4040
29
+
30
+ # Window open switch (changes to a lower target temperature when on).
23
31
WINDOW_OPEN_ATTR_ID = 0x4042
32
+
33
+ # Boost preset mode.
24
34
BOOST_ATTR_ID = 0x4043
25
35
26
36
"""Bosch specific user interface attribute ids."""
37
+
38
+ # Display orientation with values BoschDisplayOrientation.
27
39
SCREEN_ORIENTATION_ATTR_ID = 0x400B
40
+
41
+ # Displayed temperature with values BoschDisplayedTemperature.
28
42
DISPLAY_MODE_ATTR_ID = 0x4039
43
+
44
+ # Display on-time (5s - 30s).
29
45
SCREEN_TIMEOUT_ATTR_ID = 0x403A
30
- SCREEN_BRIGHTNESS_ATTR_ID = 0x403B
31
46
32
- """Bosh operating mode attribute values."""
47
+ # Display brightness (0 - 10).
48
+ SCREEN_BRIGHTNESS_ATTR_ID = 0x403B
33
49
34
50
35
51
class BoschOperatingMode (t .enum8 ):
52
+ """Bosh operating mode attribute values."""
53
+
36
54
Schedule = 0x00
37
55
Manual = 0x01
38
56
Pause = 0x05
39
57
40
58
41
- """Bosch thermostat preset."""
42
-
43
-
44
59
class BoschPreset (t .enum8 ):
60
+ """Bosch thermostat preset."""
61
+
45
62
Normal = 0x00
46
63
Boost = 0x01
47
64
48
65
49
- """Binary attribute (window open) value."""
50
-
51
-
52
66
class State (t .enum8 ):
67
+ """Binary attribute (window open) value."""
68
+
53
69
Off = 0x00
54
70
On = 0x01
55
71
56
72
57
- """Bosch display orientation attribute values."""
58
-
59
-
60
73
class BoschDisplayOrientation (t .enum8 ):
74
+ """Bosch display orientation attribute values."""
75
+
61
76
Normal = 0x00
62
77
Flipped = 0x01
63
78
64
79
65
- """Bosch displayed temperature attribute values."""
66
-
67
-
68
80
class BoschDisplayedTemperature (t .enum8 ):
81
+ """Bosch displayed temperature attribute values."""
82
+
69
83
Target = 0x00
70
84
Measured = 0x01
71
85
@@ -342,7 +356,7 @@ class BoschThermostat(CustomDeviceV2):
342
356
BoschThermostatCluster .cluster_id ,
343
357
translation_key = "window_detection" ,
344
358
)
345
- # Remote temperature
359
+ # Remote temperature.
346
360
.number (
347
361
BoschThermostatCluster .AttributeDefs .remote_temperature .name ,
348
362
BoschThermostatCluster .cluster_id ,
@@ -360,14 +374,14 @@ class BoschThermostat(CustomDeviceV2):
360
374
BoschUserInterfaceCluster .cluster_id ,
361
375
translation_key = "device_temperature" ,
362
376
)
363
- # Display orientation
377
+ # Display orientation.
364
378
.enum (
365
379
BoschUserInterfaceCluster .AttributeDefs .display_orientation .name ,
366
380
BoschDisplayOrientation ,
367
381
BoschUserInterfaceCluster .cluster_id ,
368
382
translation_key = "inverted" ,
369
383
)
370
- # Display time-out
384
+ # Display time-out.
371
385
.number (
372
386
BoschUserInterfaceCluster .AttributeDefs .display_ontime .name ,
373
387
BoschUserInterfaceCluster .cluster_id ,
@@ -376,7 +390,7 @@ class BoschThermostat(CustomDeviceV2):
376
390
step = 1 ,
377
391
translation_key = "on_off_transition_time" ,
378
392
)
379
- # Display brightness
393
+ # Display brightness.
380
394
.number (
381
395
BoschUserInterfaceCluster .AttributeDefs .display_brightness .name ,
382
396
BoschUserInterfaceCluster .cluster_id ,
0 commit comments