Skip to content

Commit 9eae2ea

Browse files
committed
Re-order Meter cluster updates
1 parent 710e0b3 commit 9eae2ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_tuya_energy_meter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,15 @@ async def test_tuya_energy_meter_quirk_energy_direction_align(
203203
)
204204

205205
# update Metering attributes
206+
channel_ep.smartenergy_metering.update_attribute(
207+
Metering.AttributeDefs.instantaneous_demand.name + UNSIGNED_ATTR_SUFFIX,
208+
POWER,
209+
)
206210
channel_ep.smartenergy_metering.update_attribute(
207211
# The UNSIGNED_ATTR_SUFFIX applies energy direction on bidirectional devices
208212
Metering.AttributeDefs.current_summ_received.name,
209213
SUMM_RECEIVED,
210214
)
211-
channel_ep.smartenergy_metering.update_attribute(
212-
Metering.AttributeDefs.instantaneous_demand.name + UNSIGNED_ATTR_SUFFIX,
213-
POWER,
214-
)
215215

216216
# verify the Metering attributes were updated correctly
217217
assert len(listeners[channel]["metering"].attribute_updates) == 2

0 commit comments

Comments
 (0)