Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove third interlock situation #135

Merged
merged 3 commits into from
Jan 6, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions plugwise_usb/nodes/circle.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@
if (
self._energy_pulses_today_hourly is None
or self._energy_rollover_history_started
or ( self._energy_rollover_hour_started
and not self._energy_rollover_history_started )
):
_utc_hour_timestamp = datetime.utcnow().replace(
minute=0, second=0, microsecond=0
Expand Down Expand Up @@ -650,7 +652,7 @@
self.mac,
str(log_address),
)
elif len(self._energy_history) > 48:
elif len(self._energy_history) > 24:

Check warning on line 655 in plugwise_usb/nodes/circle.py

View check run for this annotation

Codecov / codecov/patch

plugwise_usb/nodes/circle.py#L655

Added line #L655 was not covered by tests
# Energy history already collected
if (
log_address == self._last_log_address
Expand Down Expand Up @@ -791,7 +793,7 @@
# Reset energy collection progress
if (
self._energy_history_collecting
and len(self._energy_history) > 48
and len(self._energy_history) > 24
and self._energy_last_collected_timestamp == _utc_hour_timestamp
):
self._energy_last_rollover_timestamp = self._energy_last_collected_timestamp
Expand Down
Loading