Skip to content

Commit 9be3442

Browse files
committed
Wait for most recent energy counter
1 parent 0f93853 commit 9be3442

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugwise/nodes/circle.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,11 @@ def _response_energy_counters(self, message: CircleEnergyCountersResponse):
669669
self._energy_last_collected_timestamp = _log_timestamp
670670

671671
# Reset energy collection progress
672-
if self._energy_history_collecting and len(self._energy_history) > 48:
672+
if (
673+
self._energy_history_collecting
674+
and len(self._energy_history) > 48
675+
and self._energy_last_collected_timestamp == _utc_hour_timestamp
676+
):
673677
self._energy_history_collecting = False
674678

675679
# Update energy counters

0 commit comments

Comments
 (0)