Skip to content

Commit d4fbd3e

Browse files
authored
Fixes Elko Super TR (#1638)
* Fixes Elko Super TR * Deletes unnecessary overloads in Elko Super TR
1 parent 6590459 commit d4fbd3e

File tree

1 file changed

+19
-31
lines changed

1 file changed

+19
-31
lines changed

zhaquirks/elko/smart_super_thermostat.py

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,25 @@ class Sensor(t.enum8):
5555
attributes = ElkoThermostatCluster.attributes.copy()
5656
attributes.update(
5757
{
58-
UNKNOWN_1: ("unknown_1", t.uint16_t, True),
59-
DISPLAY_TEXT: ("display_text", t.CharacterString, True),
60-
ACTIVE_SENSOR: ("active_sensor", Sensor, True),
61-
UNKNOWN_2: ("unknown_2", t.uint8_t, True),
62-
REGULATOR_MODE: ("regulator_mode", t.Bool, True),
63-
DEVICE_ON: ("device_on", t.Bool, True),
64-
UNKNOWN_3: ("unknown_3", t.LongOctetString, True),
65-
POWER_CONSUMPTION: ("power_consumtion", t.uint16_t, True),
66-
FLOOR_SENSOR_TEMPERATURE: ("floor_sensor_temperature", t.int16s, True),
67-
UNKNOWN_4: ("unknown_4", t.uint16_t, True),
68-
NIGHT_LOWERING: ("night_lowering", t.Bool, True),
69-
UNKNOWN_5: ("unknown_5", t.Bool, True),
70-
CHILD_LOCK: ("child_lock", t.Bool, True),
71-
PROTECTION_MAX_TEMP: ("protection_max_temp", t.uint8_t, True),
72-
HEATING_ACTIVE: ("heating_active", t.Bool, True),
73-
UNKNOWN_6: ("unknown_6", t.LongOctetString, True),
74-
UNKNOWN_7: ("unknown_7", t.int8s, True),
75-
UNKNOWN_8: ("unknown_8", t.uint8_t, True),
76-
UNKNOWN_9: ("unknown_9", t.uint8_t, True),
58+
UNKNOWN_1: ("unknown_1", t.uint16_t),
59+
DISPLAY_TEXT: ("display_text", t.CharacterString),
60+
ACTIVE_SENSOR: ("active_sensor", Sensor),
61+
UNKNOWN_2: ("unknown_2", t.uint8_t),
62+
REGULATOR_MODE: ("regulator_mode", t.Bool),
63+
DEVICE_ON: ("device_on", t.Bool),
64+
UNKNOWN_3: ("unknown_3", t.LongOctetString),
65+
POWER_CONSUMPTION: ("power_consumtion", t.uint16_t),
66+
FLOOR_SENSOR_TEMPERATURE: ("floor_sensor_temperature", t.int16s),
67+
UNKNOWN_4: ("unknown_4", t.uint16_t),
68+
NIGHT_LOWERING: ("night_lowering", t.Bool),
69+
UNKNOWN_5: ("unknown_5", t.Bool),
70+
CHILD_LOCK: ("child_lock", t.Bool),
71+
PROTECTION_MAX_TEMP: ("protection_max_temp", t.uint8_t),
72+
HEATING_ACTIVE: ("heating_active", t.Bool),
73+
UNKNOWN_6: ("unknown_6", t.LongOctetString),
74+
UNKNOWN_7: ("unknown_7", t.int8s),
75+
UNKNOWN_8: ("unknown_8", t.uint8_t),
76+
UNKNOWN_9: ("unknown_9", t.uint8_t),
7777
}
7878
)
7979

@@ -82,18 +82,6 @@ def __init__(self, *args, **kwargs):
8282
super().__init__(*args, **kwargs)
8383
self.active_sensor = None
8484

85-
def _read_attributes(self, args, manufacturer=None):
86-
"""Read attributes ZCL foundation command."""
87-
if manufacturer is None and self._has_manuf_attr(args):
88-
manufacturer = 0
89-
return super()._read_attributes(args, manufacturer=manufacturer)
90-
91-
def _write_attributes(self, args, manufacturer=None):
92-
"""Write attribute ZCL foundation command."""
93-
if manufacturer is None and self._has_manuf_attr([a.attrid for a in args]):
94-
manufacturer = 0
95-
return super()._write_attributes(args, manufacturer=manufacturer)
96-
9785
async def write_attributes(self, attributes, manufacturer=None):
9886
"""Override writes to thermostat attributes."""
9987
if "system_mode" in attributes:

0 commit comments

Comments
 (0)