Skip to content

Commit e1d9e38

Browse files
committed
CR: Add check on parameter not changed awake_duration
1 parent f7d4138 commit e1d9e38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plugwise_usb/nodes/sed.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ async def set_awake_duration(self, seconds: int) -> bool:
242242
raise ValueError(
243243
f"Invalid awake duration ({seconds}). It must be between 1 and 255 seconds."
244244
)
245+
if self._battery_config.awake_duration == seconds:
246+
return False
245247

246248
self._battery_config = replace(
247249
self._battery_config,

0 commit comments

Comments
 (0)