Skip to content

Commit d21633e

Browse files
authored
Merge pull request #135 from plugwise/mdi
remove third interlock situation
2 parents 206ecfa + 7b8fc2f commit d21633e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

plugwise_usb/nodes/circle.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ def _update_energy_today_now(
522522
if (
523523
self._energy_pulses_today_hourly is None
524524
or self._energy_rollover_history_started
525+
or ( self._energy_rollover_hour_started
526+
and not self._energy_rollover_history_started )
525527
):
526528
_utc_hour_timestamp = datetime.utcnow().replace(
527529
minute=0, second=0, microsecond=0
@@ -650,7 +652,7 @@ def request_energy_counters(self, log_address=None, callback=None):
650652
self.mac,
651653
str(log_address),
652654
)
653-
elif len(self._energy_history) > 48:
655+
elif len(self._energy_history) > 24:
654656
# Energy history already collected
655657
if (
656658
log_address == self._last_log_address
@@ -791,7 +793,7 @@ def _response_energy_counters(self, message: CircleEnergyCountersResponse):
791793
# Reset energy collection progress
792794
if (
793795
self._energy_history_collecting
794-
and len(self._energy_history) > 48
796+
and len(self._energy_history) > 24
795797
and self._energy_last_collected_timestamp == _utc_hour_timestamp
796798
):
797799
self._energy_last_rollover_timestamp = self._energy_last_collected_timestamp

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "plugwise_usb"
7-
version = "0.31.2b5"
7+
version = "0.31.2b6"
88
license = {file = "LICENSE"}
99
description = "Plugwise USB (Stick) module for Python 3."
1010
readme = "README.md"

0 commit comments

Comments
 (0)