Skip to content

Commit 9ca5773

Browse files
committed
_update_log_references(): don't sync to pulse-counter reset
The timestamps are set by the device
1 parent 679d021 commit 9ca5773

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -755,15 +755,6 @@ def _update_log_references(self, address: int, slot: int) -> None:
755755

756756
log_timestamp = self._logs[address][slot].timestamp
757757
is_consumption = self._logs[address][slot].is_consumption
758-
# Sync log_timestamp with the device pulsecounter reset-time
759-
# This syncs the daily reset of energy counters with the corresponding device pulsecounter reset
760-
if self._last_hourly_reset is not None:
761-
log_timestamp = log_timestamp + timedelta(
762-
minutes=self._last_hourly_reset.minute,
763-
seconds=self._last_hourly_reset.second,
764-
microseconds=self._last_hourly_reset.microsecond,
765-
)
766-
767758
# Update log references
768759
self._update_first_log_reference(address, slot, log_timestamp, is_consumption)
769760
self._update_last_log_reference(address, slot, log_timestamp, is_consumption)

0 commit comments

Comments
 (0)