Skip to content

Commit a22afaa

Browse files
committed
Try alternative
1 parent 7506354 commit a22afaa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugwise_usb/nodes/scan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _sensitivity_level_from_cache(self) -> MotionSensitivity | None:
207207
if (
208208
sensitivity_level := self._get_cache(CACHE_SCAN_CONFIG_SENSITIVITY)
209209
) is not None:
210-
return MotionSensitivity(sensitivity_level)
210+
return MotionSensitivity[sensitivity_level]
211211
return None
212212

213213
def _motion_config_dirty_from_cache(self) -> bool:

tests/test_usb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2135,7 +2135,7 @@ def fake_cache(dummy: object, setting: str) -> str | bool | None: # noqa: PLR09
21352135
if setting == pw_scan.CACHE_SCAN_CONFIG_RESET_TIMER:
21362136
return "10"
21372137
if setting == pw_scan.CACHE_SCAN_CONFIG_SENSITIVITY:
2138-
return 2
2138+
return "MEDIUM"
21392139
if setting == pw_scan.CACHE_SCAN_CONFIG_DAYLIGHT_MODE:
21402140
return False
21412141
if setting == pw_scan.CACHE_SCAN_CONFIG_DIRTY:

0 commit comments

Comments
 (0)