We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d56d5f commit 1696031Copy full SHA for 1696031
plugwise_usb/nodes/scan.py
@@ -490,9 +490,16 @@ async def _scan_configure_update(self) -> None:
490
self.save_cache(),
491
)
492
493
- async def scan_calibrate_light(self) -> None:
494
- """Schedule light sensitivity calibration of Scan device."""
+ async def scan_calibrate_light(self) -> bool:
+ """Schedule light sensitivity calibration of Scan device.
495
+
496
+ Returns True when scheduling was newly activated;
497
+ False if it was already scheduled.
498
+ """
499
+ if self._scan_calibrate_light_scheduled:
500
+ return False
501
self._scan_calibrate_light_scheduled = True
502
+ return True
503
504
async def _scan_calibrate_light(self) -> bool:
505
"""Request to calibration light sensitivity of Scan device."""
0 commit comments