File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,15 +182,10 @@ async def test_frient_emi_current_summation_write_request(zigpy_device_from_v2_q
182182 await manufacturer_cluster .write_attributes ({current_summation_attr_id : 1234 })
183183
184184 assert request_mock .call_count == 1
185- assert request_mock .call_args [0 ] == ()
186- assert request_mock .call_args [1 ]["cluster" ] == Metering .cluster_id
187- assert (
188- request_mock .call_args [1 ]["data" ]
189- == b"\x04 \xd2 \x04 \x01 \x02 \x01 \x03 %\xd2 \x04 \x00 \x00 \x00 \x00 "
190- )
185+ assert request_mock .call_args .kwargs ["cluster" ] == Metering .cluster_id
191186
192187 zcl_header , attr_data = foundation .ZCLHeader .deserialize (
193- request_mock .call_args [ 1 ] ["data" ]
188+ request_mock .call_args . kwargs ["data" ]
194189 )
195190 assert (
196191 zcl_header .frame_control .frame_type == foundation .FrameType .GLOBAL_COMMAND
Original file line number Diff line number Diff line change @@ -50,12 +50,13 @@ class AttributeDefs(BaseAttributeDefs):
5050 fallback_name = "Pulse configuration" ,
5151 )
5252 .number (
53- # Allow a user to set the current summation value, so it can show the same value as the physical meter.
53+ # Allow a user to set the current summation value,
54+ # so it can show the same value as the physical meter.
5455 attribute_name = ManufacturerMetering .AttributeDefs .current_summation .name ,
5556 cluster_id = ManufacturerMetering .cluster_id ,
5657 endpoint_id = 2 ,
5758 min_value = 0 ,
58- max_value = 281474976710655 ,
59+ max_value = 0xFFFFFFFFFFFF , # uint48 max value
5960 step = 1 ,
6061 unit = "Wh" ,
6162 mode = "box" ,
You can’t perform that action at this time.
0 commit comments