File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,8 @@ async def set_awake_duration(self, seconds: int) -> bool:
247247 raise ValueError (
248248 f"Invalid awake duration ({ seconds } ). It must be between 1 and 255 seconds."
249249 )
250+ if self .battery_config .awake_duration == seconds :
251+ return False
250252
251253 self ._new_battery_config = replace (
252254 self ._new_battery_config , awake_duration = seconds
@@ -274,7 +276,6 @@ async def set_clock_interval(self, minutes: int) -> bool:
274276 raise ValueError (
275277 f"Invalid clock interval ({ minutes } ). It must be between 1 and 65535 minutes."
276278 )
277-
278279 if self .battery_config .clock_interval == minutes :
279280 return False
280281
@@ -327,7 +328,6 @@ async def set_maintenance_interval(self, minutes: int) -> bool:
327328 raise ValueError (
328329 f"Invalid maintenance interval ({ minutes } ). It must be between 1 and 1440 minutes."
329330 )
330-
331331 if self .battery_config .maintenance_interval == minutes :
332332 return False
333333
You can’t perform that action at this time.
0 commit comments