From 62e52801ada7010ff422a21ef2e17f82dd4ff8db Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Fri, 11 Mar 2022 20:25:16 +0100 Subject: [PATCH] update timeout handling in backend --- apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py b/apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py index f7a3d498..21a425b7 100644 --- a/apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py +++ b/apps/nspanel-lovelance-ui/nspanel-lovelance-ui.py @@ -89,12 +89,7 @@ class NsPanelLovelanceUI: # set screensaver timeout timeout = self.config["timeoutScreensaver"] - if timeout > 60: - timeout = 60 - if timeout < 5: - timeout = 5 - timeout = timeout * 1000 - self.send_mqtt_msg("timeout,{0},{1}".format(timeout, 1)) + self.send_mqtt_msg(f"timeout,{timeout}") # send screensaver brightness self.update_screensaver_brightness(kwargs={"value": self.current_screensaver_brightness})