|
2 | 2 |
|
3 | 3 | from zigpy.quirks import CustomCluster
|
4 | 4 | from zigpy.quirks.v2 import QuirkBuilder
|
5 |
| -from zigpy.quirks.v2.homeassistant import EntityType, PERCENTAGE |
6 |
| -import zigpy.types as t |
7 |
| -from zigpy.zcl.clusters.hvac import ( |
8 |
| - Thermostat, |
9 |
| - UserInterface, |
10 |
| - TemperatureDisplayMode, |
11 |
| -) |
| 5 | +from zigpy.quirks.v2.homeassistant import PERCENTAGE, EntityType |
12 | 6 | from zigpy.quirks.v2.homeassistant.sensor import SensorStateClass
|
| 7 | +import zigpy.types as t |
| 8 | +from zigpy.zcl.clusters.hvac import TemperatureDisplayMode, Thermostat, UserInterface |
13 | 9 | from zigpy.zcl.foundation import ZCLAttributeDef
|
14 | 10 |
|
15 | 11 | """Bosch specific thermostat attribute ids."""
|
@@ -55,10 +51,8 @@ class BoschThermostatCluster(CustomCluster, Thermostat):
|
55 | 51 |
|
56 | 52 | # Works around an issue where ZHA thinks "Heating_Only" can't be changed
|
57 | 53 | # 0x06 is "centralite specific", but works perfectly for this thermostat as well
|
58 |
| - _CONSTANT_ATTRIBUTES = { |
59 |
| - Thermostat.AttributeDefs.ctrl_sequence_of_oper.id: 0x06 |
60 |
| - } |
61 |
| - |
| 54 | + _CONSTANT_ATTRIBUTES = {Thermostat.AttributeDefs.ctrl_sequence_of_oper.id: 0x06} |
| 55 | + |
62 | 56 | class AttributeDefs(Thermostat.AttributeDefs):
|
63 | 57 | """Bosch thermostat manufacturer specific attributes."""
|
64 | 58 |
|
@@ -86,7 +80,7 @@ class AttributeDefs(Thermostat.AttributeDefs):
|
86 | 80 | type=State,
|
87 | 81 | is_manufacturer_specific=True,
|
88 | 82 | )
|
89 |
| - |
| 83 | + |
90 | 84 | temperature_display_mode = ZCLAttributeDef(
|
91 | 85 | id=0x0000,
|
92 | 86 | type=TemperatureDisplayMode,
|
|
0 commit comments