mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-21 15:04:24 +01:00
Merge pull request #18 from gerard33/patch-1
Change timeout screensaver to seconds
This commit is contained in:
@@ -51,7 +51,7 @@ nspanel-1:
|
||||
config:
|
||||
panelRecvTopic: "tele/tasmota_your_mqtt_topic/RESULT"
|
||||
panelSendTopic: "cmnd/tasmota_your_mqtt_topic/CustomSend"
|
||||
timeoutScreensaver: 15000
|
||||
timeoutScreensaver: 15 #in seconds, values between 5 and 60 are allowed
|
||||
#brightnessScreensaver: 10
|
||||
brightnessScreensaver:
|
||||
- time: "7:00:00"
|
||||
|
||||
@@ -8,7 +8,7 @@ nspanel:
|
||||
locale: "de_DE"
|
||||
timeFormat: "%H : %M"
|
||||
dateFormat: "%A, %d. %B %Y"
|
||||
timeoutScreensaver: 15000 # value in ms, must be between 50 and 65535
|
||||
timeoutScreensaver: 15 #in seconds, values between 5 and 60 are allowed
|
||||
#brightnessScreensaver: 10
|
||||
brightnessScreensaver:
|
||||
- time: "7:00:00"
|
||||
|
||||
@@ -67,10 +67,11 @@ class NsPanelLovelanceUI:
|
||||
|
||||
# set screensaver timeout
|
||||
timeout = self.config["timeoutScreensaver"]
|
||||
if timeout > 65535:
|
||||
timeout = 65535
|
||||
if timeout < 50:
|
||||
timeout = 50
|
||||
if timeout > 60:
|
||||
timeout = 60
|
||||
if timeout < 5:
|
||||
timeout = 5
|
||||
timeout = timeout * 1000
|
||||
self.send_mqtt_msg("timeout,{0}".format(timeout))
|
||||
|
||||
# send screensaver brightness
|
||||
|
||||
Reference in New Issue
Block a user