mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-26 19:02:15 +01:00
fix
This commit is contained in:
@@ -709,6 +709,8 @@ class LuiPagesGen(object):
|
|||||||
# send sleep timeout if there is one configured for the current card
|
# send sleep timeout if there is one configured for the current card
|
||||||
if card.sleepTimeout is not None:
|
if card.sleepTimeout is not None:
|
||||||
self._send_mqtt_msg(f"timeout~{card.sleepTimeout}")
|
self._send_mqtt_msg(f"timeout~{card.sleepTimeout}")
|
||||||
|
else:
|
||||||
|
self._send_mqtt_msg(f'timeout~{self._config.get("sleepTimeout",20)}')
|
||||||
|
|
||||||
temp_unit = card.raw_config.get("temperatureUnit", "celsius")
|
temp_unit = card.raw_config.get("temperatureUnit", "celsius")
|
||||||
if card.cardType in ["cardEntities", "cardGrid"]:
|
if card.cardType in ["cardEntities", "cardGrid"]:
|
||||||
@@ -738,10 +740,6 @@ class LuiPagesGen(object):
|
|||||||
theme = card.raw_config.get("theme")
|
theme = card.raw_config.get("theme")
|
||||||
self.update_screensaver_weather(theme)
|
self.update_screensaver_weather(theme)
|
||||||
self.update_status_icons()
|
self.update_status_icons()
|
||||||
|
|
||||||
# set screensaver timeout
|
|
||||||
timeout = self._config.get("sleepTimeout")
|
|
||||||
self._send_mqtt_msg(f"timeout~{timeout}")
|
|
||||||
return
|
return
|
||||||
if card.cardType == "cardQR":
|
if card.cardType == "cardQR":
|
||||||
qrcode = card.raw_config.get("qrCode", "")
|
qrcode = card.raw_config.get("qrCode", "")
|
||||||
|
|||||||
Reference in New Issue
Block a user