Skip to content

Commit b8b3508

Browse files
Fix test_attributes_updated_not_replaced for UserInterface
1 parent f9f219d commit b8b3508

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

zhaquirks/xiaomi/custom/z03mmc.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
RelativeHumidity as RelativeHumidityBase,
99
TemperatureMeasurement as TemperatureMeasurementBase,
1010
)
11-
from zigpy.zcl.foundation import BaseAttributeDefs, ZCLAttributeDef
11+
from zigpy.zcl.foundation import ZCLAttributeDef
1212

1313
from zhaquirks import CustomCluster
1414
from zhaquirks.const import (
@@ -52,21 +52,17 @@ class AttributeDefs(RelativeHumidityBase.AttributeDefs):
5252
)
5353

5454

55-
class UserInterface(CustomCluster):
55+
class UserInterface(CustomCluster, UserInterfaceBase):
5656
"""Custom User Interface Cluster with smiley control."""
5757

58-
cluster_id = UserInterfaceBase.cluster_id
59-
60-
class AttributeDefs(BaseAttributeDefs):
58+
class AttributeDefs(UserInterfaceBase.AttributeDefs):
6159
"""Attribute Definitions."""
6260

63-
# of the 3 ZCL spec attributes, only the first one (TemperatureDisplayMode) is implemented
61+
# of the 3 ZCL Thermostat User Interface spec attributes,
62+
# only the first one (TemperatureDisplayMode) is implemented fully.
6463
# KeypadLockout is implemented but completely unused in the device firmware
65-
# ScheduleProgrammingVisibility is not implemented at all
64+
# and ScheduleProgrammingVisibility is not implemented at all
6665
# https://github.com/devbis/z03mmc/blob/1.1.0/src/sensorEpCfg.c#L256
67-
temperature_display_mode = (
68-
UserInterfaceBase.AttributeDefs.temperature_display_mode
69-
)
7066

7167
# 0 - smiley is off, 1 - smiley is on (according to comfort values)
7268
smiley = ZCLAttributeDef(

0 commit comments

Comments
 (0)