From 8398684cc689735de5c3550b9f47ed75bbd3ee1e Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Mon, 20 Nov 2023 21:01:08 +0100 Subject: [PATCH] move config file --- nspanel-lovelace-ui/config.yaml | 4 ++-- nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py | 2 +- .../rootfs/usr/bin/mqtt-manager/panel_cards.py | 2 +- .../mqtt-manager/{config.yml.example => panels.yaml.example} | 0 nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/run.sh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/{config.yml.example => panels.yaml.example} (100%) diff --git a/nspanel-lovelace-ui/config.yaml b/nspanel-lovelace-ui/config.yaml index 9b04a134..9efd057b 100644 --- a/nspanel-lovelace-ui/config.yaml +++ b/nspanel-lovelace-ui/config.yaml @@ -15,9 +15,9 @@ arch: - i386 init: false map: - - share:rw + - addon_config:rw options: message: "Hello world..." schema: message: "str?" -image: "ghcr.io/jobr99/{arch}-nspanel-lovelace-ui" +#image: "ghcr.io/jobr99/{arch}-nspanel-lovelace-ui" 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 9daa01b3..871d21ce 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/main.py @@ -64,7 +64,7 @@ def on_message(client, userdata, msg): def get_config_file(): CONFIG_FILE = os.getenv('CONFIG_FILE') if not CONFIG_FILE: - CONFIG_FILE = './config.yml' + CONFIG_FILE = './panels.yaml' return CONFIG_FILE def get_config(file): diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel_cards.py b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel_cards.py index 4fb11a4b..2126551c 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel_cards.py +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panel_cards.py @@ -43,7 +43,7 @@ class Entity: page_search_res = self.panel.searchCard( self.entity_id.split(".")[1]) if page_search_res is not None: - if name is "": + if name == "": name = page_search_res.title value = get_translation( self.locale, "frontend.ui.card.button.press") diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/config.yml.example b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panels.yaml.example similarity index 100% rename from nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/config.yml.example rename to nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/panels.yaml.example diff --git a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/run.sh b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/run.sh index aa1e0d47..965efd36 100644 --- a/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/run.sh +++ b/nspanel-lovelace-ui/rootfs/usr/bin/mqtt-manager/run.sh @@ -8,10 +8,10 @@ if [ -z ${STANDALONE+x} ]; then else echo "RUNNING IN STANDALONE MODE" fi -export CONFIG_FILE=/share/config.yml +export CONFIG_FILE=/config/panels.yaml if test -f "$CONFIG_FILE"; then echo "$CONFIG_FILE exists." else - cp /usr/bin/mqtt-manager/config.yml.example $CONFIG_FILE + cp /usr/bin/mqtt-manager/panels.yaml.example $CONFIG_FILE fi python /usr/bin/mqtt-manager/main.py \ No newline at end of file