Skip to content

Commit 9da04f3

Browse files
committed
Drop log when exact 24hrs old
1 parent 9e3e91c commit 9da04f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def _add_log_record(
468468
return False
469469

470470
# Drop useless log records when we have at least 4 logs
471-
if self.collected_logs > 4 and log_record.timestamp < (
471+
if self.collected_logs > 4 and log_record.timestamp <= (
472472
datetime.now(tz=UTC) - timedelta(hours=MAX_LOG_HOURS)
473473
):
474474
return False

0 commit comments

Comments
 (0)