move config file

This commit is contained in:
joBr99
2023-11-20 21:01:08 +01:00
parent 53deb3ab85
commit 8398684cc6
5 changed files with 6 additions and 6 deletions

View File

@@ -15,9 +15,9 @@ arch:
- i386 - i386
init: false init: false
map: map:
- share:rw - addon_config:rw
options: options:
message: "Hello world..." message: "Hello world..."
schema: schema:
message: "str?" message: "str?"
image: "ghcr.io/jobr99/{arch}-nspanel-lovelace-ui" #image: "ghcr.io/jobr99/{arch}-nspanel-lovelace-ui"

View File

@@ -64,7 +64,7 @@ def on_message(client, userdata, msg):
def get_config_file(): def get_config_file():
CONFIG_FILE = os.getenv('CONFIG_FILE') CONFIG_FILE = os.getenv('CONFIG_FILE')
if not CONFIG_FILE: if not CONFIG_FILE:
CONFIG_FILE = './config.yml' CONFIG_FILE = './panels.yaml'
return CONFIG_FILE return CONFIG_FILE
def get_config(file): def get_config(file):

View File

@@ -43,7 +43,7 @@ class Entity:
page_search_res = self.panel.searchCard( page_search_res = self.panel.searchCard(
self.entity_id.split(".")[1]) self.entity_id.split(".")[1])
if page_search_res is not None: if page_search_res is not None:
if name is "": if name == "":
name = page_search_res.title name = page_search_res.title
value = get_translation( value = get_translation(
self.locale, "frontend.ui.card.button.press") self.locale, "frontend.ui.card.button.press")

View File

@@ -8,10 +8,10 @@ if [ -z ${STANDALONE+x} ]; then
else else
echo "RUNNING IN STANDALONE MODE" echo "RUNNING IN STANDALONE MODE"
fi fi
export CONFIG_FILE=/share/config.yml export CONFIG_FILE=/config/panels.yaml
if test -f "$CONFIG_FILE"; then if test -f "$CONFIG_FILE"; then
echo "$CONFIG_FILE exists." echo "$CONFIG_FILE exists."
else else
cp /usr/bin/mqtt-manager/config.yml.example $CONFIG_FILE cp /usr/bin/mqtt-manager/panels.yaml.example $CONFIG_FILE
fi fi
python /usr/bin/mqtt-manager/main.py python /usr/bin/mqtt-manager/main.py