mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-20 14:37:01 +01:00
.
This commit is contained in:
@@ -232,7 +232,7 @@ def execute_script(entity_name: str, domain: str, service: str, service_data: di
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
send_message(json.dumps(msg))
|
send_message(json.dumps(msg))
|
||||||
# busy waiting for response with a timeout of 0.2 seconds - maybe there's a better way of doing this
|
# busy waiting for response with a timeout of 0.4 seconds- maybe there's a better way of doing this
|
||||||
mustend = time.time() + 0.4
|
mustend = time.time() + 0.4
|
||||||
while time.time() < mustend:
|
while time.time() < mustend:
|
||||||
if response_buffer[call_id] == True:
|
if response_buffer[call_id] == True:
|
||||||
|
|||||||
@@ -76,9 +76,9 @@ class LovelaceUIPanel:
|
|||||||
ha_control.wait_for_ha_cache()
|
ha_control.wait_for_ha_cache()
|
||||||
|
|
||||||
#request templates on cards
|
#request templates on cards
|
||||||
if self.settings.get("sleepBrightness").startswith("ha:"):
|
if isinstance(self.settings.get("sleepBrightness",""), str) and self.settings.get("sleepBrightness", "").startswith("ha:"):
|
||||||
libs.home_assistant.cache_template(self.settings.get("sleepBrightness"))
|
libs.home_assistant.cache_template(self.settings.get("sleepBrightness"))
|
||||||
if self.settings.get("screenBrightness").startswith("ha:"):
|
if isinstance(self.settings.get("sleepBrightness",""), str) and self.settings.get("screenBrightness", "").startswith("ha:"):
|
||||||
libs.home_assistant.cache_template(self.settings.get("screenBrightness"))
|
libs.home_assistant.cache_template(self.settings.get("screenBrightness"))
|
||||||
for c in self.cards.values():
|
for c in self.cards.values():
|
||||||
if hasattr(c, "qrcode"):
|
if hasattr(c, "qrcode"):
|
||||||
|
|||||||
Reference in New Issue
Block a user