Skip to content

Commit

Permalink
Merge pull request #135 from plugwise/mdi
Browse files Browse the repository at this point in the history
remove third interlock situation
  • Loading branch information
dirixmjm committed Jan 6, 2024
2 parents 206ecfa + 7b8fc2f commit d21633e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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 @@ def _update_energy_today_now(
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 @@ def request_energy_counters(self, log_address=None, callback=None):
self.mac,
str(log_address),
)
elif len(self._energy_history) > 48:
elif len(self._energy_history) > 24:
# Energy history already collected
if (
log_address == self._last_log_address
Expand Down Expand Up @@ -791,7 +793,7 @@ def _response_energy_counters(self, message: CircleEnergyCountersResponse):
# 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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "plugwise_usb"
version = "0.31.2b5"
version = "0.31.2b6"
license = {file = "LICENSE"}
description = "Plugwise USB (Stick) module for Python 3."
readme = "README.md"
Expand Down

0 comments on commit d21633e

Please sign in to comment.