From fce9265b5dc4919b00bd193c8d497c4ad7261be6 Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Fri, 24 Nov 2023 15:27:10 +0100 Subject: [PATCH] do not force supervised settings in case env var is set and config is there --- nspanel-lovelace-ui/config.yaml | 2 +- nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nspanel-lovelace-ui/config.yaml b/nspanel-lovelace-ui/config.yaml index da43963d..9f28c9a2 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.32" +version: "4.7.33" 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 7d1d596f..fbe5b7b5 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py @@ -100,7 +100,7 @@ def get_config(file): if not settings.get("home_assistant_token"): st = os.getenv('SUPERVISOR_TOKEN') - if st is not None: + if st and "home_assistant_token" not in settings and "home_assistant_address" not in settings: settings["home_assistant_token"] = st settings["home_assistant_address"] = "http://supervisor" settings["is_addon"] = True