Skip to content

Commit 2e82c9b

Browse files
committed
Allow energy history to be 0
1 parent 5a8e6ff commit 2e82c9b

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
@@ -398,7 +398,7 @@ def _collect_energy_pulses(self, start_utc: datetime, end_utc: datetime):
398398
_energy_pulses = 0
399399
for hour in range(0, hours + 1):
400400
_log_timestamp = start_utc + timedelta(hours=hour)
401-
if self._energy_history.get(_log_timestamp):
401+
if self._energy_history.get(_log_timestamp) is not None:
402402
_energy_pulses += self._energy_history[_log_timestamp]
403403
_LOGGER.debug(
404404
"_collect_energy_pulses for %s | %s : %s, total = %s",

0 commit comments

Comments
 (0)