Skip to content

Commit 9bc6bb6

Browse files
committed
Try 5
1 parent eddf3f7 commit 9bc6bb6

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

plugwise_usb/nodes/sed.py

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ async def set_sleep_duration(self, minutes: int) -> bool:
386386
# endregion
387387
# region Properties
388388
@property
389-
# @raise_not_loaded
390389
def awake_duration(self) -> int:
391390
"""Duration in seconds a battery powered devices is awake."""
392391
if self._new_battery_config.awake_duration is not None:
@@ -396,19 +395,6 @@ def awake_duration(self) -> int:
396395
return SED_DEFAULT_AWAKE_DURATION
397396

398397
@property
399-
#@raise_not_loaded
400-
def battery_config(self) -> BatteryConfig:
401-
"""Battery related configuration settings."""
402-
return BatteryConfig(
403-
awake_duration=self.awake_duration,
404-
clock_interval=self.clock_interval,
405-
clock_sync=self.clock_sync,
406-
maintenance_interval=self.maintenance_interval,
407-
sleep_duration=self.sleep_duration,
408-
)
409-
410-
@property
411-
#@raise_not_loaded
412398
def clock_interval(self) -> int:
413399
"""Return the clock interval value."""
414400
if self._new_battery_config.clock_interval is not None:
@@ -418,7 +404,6 @@ def clock_interval(self) -> int:
418404
return SED_DEFAULT_CLOCK_INTERVAL
419405

420406
@property
421-
#@raise_not_loaded
422407
def clock_sync(self) -> bool:
423408
"""Indicate if the internal clock must be synced."""
424409
if self._new_battery_config.clock_sync is not None:
@@ -428,7 +413,6 @@ def clock_sync(self) -> bool:
428413
return SED_DEFAULT_CLOCK_SYNC
429414

430415
@property
431-
#@raise_not_loaded
432416
def maintenance_interval(self) -> int:
433417
"""Return the maintenance interval value.
434418
@@ -441,12 +425,6 @@ def maintenance_interval(self) -> int:
441425
return SED_DEFAULT_MAINTENANCE_INTERVAL
442426

443427
@property
444-
def sed_config_task_scheduled(self) -> bool:
445-
"""Check if a configuration task is scheduled."""
446-
return self._sed_config_task_scheduled
447-
448-
@property
449-
#@raise_not_loaded
450428
def sleep_duration(self) -> int:
451429
"""Return the sleep duration value in minutes.
452430
@@ -458,6 +436,22 @@ def sleep_duration(self) -> int:
458436
return self._battery_config.sleep_duration
459437
return SED_DEFAULT_SLEEP_DURATION
460438

439+
@property
440+
def battery_config(self) -> BatteryConfig:
441+
"""Battery related configuration settings."""
442+
return BatteryConfig(
443+
awake_duration=self.awake_duration,
444+
clock_interval=self.clock_interval,
445+
clock_sync=self.clock_sync,
446+
maintenance_interval=self.maintenance_interval,
447+
sleep_duration=self.sleep_duration,
448+
)
449+
450+
@property
451+
def sed_config_task_scheduled(self) -> bool:
452+
"""Check if a configuration task is scheduled."""
453+
return self._sed_config_task_scheduled
454+
461455
# endregion
462456
async def _configure_sed_task(self) -> bool:
463457
"""Configure SED settings. Returns True if successful."""

0 commit comments

Comments
 (0)