From 7d6428a03bc264a76c03a3ca012459916c6d4f18 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Sat, 23 Mar 2024 09:31:53 -0400 Subject: [PATCH] settings: fix bug in backlight 2 durations --- lib/logitech_receiver/settings_templates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logitech_receiver/settings_templates.py b/lib/logitech_receiver/settings_templates.py index edbb9701..1b42e891 100644 --- a/lib/logitech_receiver/settings_templates.py +++ b/lib/logitech_receiver/settings_templates.py @@ -334,7 +334,7 @@ class Backlight2Duration(_Setting): min_version = 3 validator_class = _RangeV min_value = 1 - max_value = 120 # actual maximum is 2 hours + max_value = 600 # 10 minutes - actual maximum is 2 hours validator_options = {"byte_count": 2} class rw_class: @@ -345,7 +345,7 @@ class Backlight2Duration(_Setting): def read(self, device): backlight = device.backlight - return _int2bytes(getattr(backlight, self.field), 2) * 5 # use seconds instead of 5-second units + return _int2bytes(getattr(backlight, self.field) * 5, 2) # use seconds instead of 5-second units def write(self, device, data_bytes): backlight = device.backlight