Skip to content

Commit 1bb0627

Browse files
committed
Fix calculating energy counter address
1 parent c516dc0 commit 1bb0627

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugwise/nodes/circle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ def _energy_timestamp_memory_address(self, utc_timestamp: datetime):
813813
if utc_timestamp > _utc_now_timestamp:
814814
return None
815815

816-
_seconds_offset = _utc_now_timestamp.second
816+
_seconds_offset = (_utc_now_timestamp - utc_timestamp).seconds
817817
_hours_offset = _seconds_offset / 3600
818818

819819
_slot = self._energy_last_populated_slot

0 commit comments

Comments
 (0)