Skip to content

Commit e680276

Browse files
committed
Improve hourly_reset_time property
1 parent 1ac3a97 commit e680276

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,13 @@ def collected_logs(self) -> int:
107107
return counter
108108

109109
@property
110-
def hourly_reset_time(self) -> datetime:
110+
def hourly_reset_time(self) -> datetime | None:
111111
"""Provide the device hourly pulse reset time."""
112112
if timestamp := self.cons_last_hourly_reset is not None:
113113
return timestamp
114114
if timestamp := self.prod_last_hourly_reset is not None:
115115
return timestamp
116+
return None
116117

117118
@property
118119
def logs(self) -> dict[int, dict[int, PulseLogRecord]]:

0 commit comments

Comments
 (0)