diff --git a/nspanel-lovelace-ui/config.yaml b/nspanel-lovelace-ui/config.yaml index 348e24f2..8769444a 100644 --- a/nspanel-lovelace-ui/config.yaml +++ b/nspanel-lovelace-ui/config.yaml @@ -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: diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py index 3d340062..ac5055cc 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py @@ -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