This commit is contained in:
joBr99
2023-12-01 23:48:11 +01:00
parent 4795cc23ad
commit 770348b07b
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
name: NSPanel Lovelace UI Addon
version: "4.7.65"
version: "4.7.66"
slug: nspanel-lovelace-ui
description: NSPanel Lovelace UI Addon
services:

View File

@@ -59,7 +59,7 @@ def process_output_to_panel():
def connect():
global settings, panel_out_queue
if settings["mqtt_server"] and not settings["use_ha_api"]:
if "mqtt_server" in settings and not "use_ha_api" in settings:
MqttManager(settings, panel_out_queue, panel_in_queues)
else:
logging.info("MQTT values not configured, will not connect.")
@@ -73,7 +73,7 @@ def connect():
while not libs.home_assistant.ws_connected:
time.sleep(1)
if settings["use_ha_api"]:
if settings.get("use_ha_api"):
libs.home_assistant.subscribe_to_nspanel_events(on_ha_panel_event)
send_to_panel_thread = threading.Thread(target=process_output_to_panel, args=())
send_to_panel_thread.daemon = True