Skip to content

Commit f8772c4

Browse files
address pr comments
1 parent 7a575ae commit f8772c4

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

tests/test_develco.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff 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

zhaquirks/develco/emi_led.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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",

0 commit comments

Comments
 (0)