This commit is contained in:
Johannes
2023-02-13 19:17:33 +01:00
committed by GitHub
parent 8e48a27745
commit 6c70830ab6
3 changed files with 9 additions and 4 deletions

View File

@@ -705,6 +705,10 @@ class LuiPagesGen(object):
# Switch to page
if send_page_type:
self.page_type(card.cardType)
# send sleep timeout if there is one configured for the current card
if card.sleepTimeout is not None:
self._send_mqtt_msg(f"timeout~{card.sleepTimeout}")
temp_unit = card.raw_config.get("temperatureUnit", "celsius")
if card.cardType in ["cardEntities", "cardGrid"]:
@@ -734,6 +738,10 @@ class LuiPagesGen(object):
theme = card.raw_config.get("theme")
self.update_screensaver_weather(theme)
self.update_status_icons()
# set screensaver timeout
timeout = self._config.get("sleepTimeout")
self._send_mqtt_msg(f"timeout~{timeout}")
return
if card.cardType == "cardQR":
qrcode = card.raw_config.get("qrCode", "")