@@ -101,6 +101,7 @@ async def test_handle_get_data(
101
101
("_TZE204_utkemkbs" , "TS0601" , 100 , 10 ),
102
102
("_TZE204_yjjdcqsq" , "TS0601" , 100 , 10 ),
103
103
("_TZE204_ksz749x8" , "TS0601" , 100 , 10 ),
104
+ ("_TZE204_upagmta9" , "TS0601" , 100 , 10 ),
104
105
],
105
106
)
106
107
async def test_handle_get_data_enum_batt (
@@ -117,7 +118,10 @@ async def test_handle_get_data_enum_batt(
117
118
assert ep .tuya_manufacturer is not None
118
119
assert isinstance (ep .tuya_manufacturer , TuyaMCUCluster )
119
120
120
- message = b"\x09 \xe0 \x02 \x0b \x33 \x01 \x02 \x00 \x04 \x00 \x00 \x00 \xfd \x02 \x02 \x00 \x04 \x00 \x00 \x00 \x47 \x04 \x02 \x00 \x04 \x00 \x00 \x00 \x01 "
121
+ if model == "_TZE204_upagmta9" : # Uses dp 3 for battery
122
+ message = b"\x09 \xe0 \x02 \x0b \x33 \x01 \x02 \x00 \x04 \x00 \x00 \x00 \xfd \x02 \x02 \x00 \x04 \x00 \x00 \x00 \x47 \x03 \x02 \x00 \x04 \x00 \x00 \x00 \x01 "
123
+ else :
124
+ message = b"\x09 \xe0 \x02 \x0b \x33 \x01 \x02 \x00 \x04 \x00 \x00 \x00 \xfd \x02 \x02 \x00 \x04 \x00 \x00 \x00 \x47 \x04 \x02 \x00 \x04 \x00 \x00 \x00 \x01 "
121
125
hdr , data = ep .tuya_manufacturer .deserialize (message )
122
126
123
127
status = ep .tuya_manufacturer .handle_get_data (data .data )
@@ -164,6 +168,3 @@ def test_valid_attributes(zigpy_device_from_v2_quirk):
164
168
assert {temperature_attr_id } == temperature_cluster ._VALID_ATTRIBUTES
165
169
assert {humidity_attr_id } == humidity_cluster ._VALID_ATTRIBUTES
166
170
assert {power_attr_id } == power_config_cluster ._VALID_ATTRIBUTES
167
-
168
-
169
- # _TZE204_upagmta9
0 commit comments