mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-22 22:18:38 +01:00
.
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
||||||
name: NSPanel Lovelace UI Addon
|
name: NSPanel Lovelace UI Addon
|
||||||
version: "4.7.4"
|
version: "4.7.11"
|
||||||
slug: nspanel-lovelace-ui
|
slug: nspanel-lovelace-ui
|
||||||
description: NSPanel Lovelace UI Addon
|
description: NSPanel Lovelace UI Addon
|
||||||
|
services:
|
||||||
|
- "mqtt:want"
|
||||||
|
homeassistant_api: true
|
||||||
url: "https://github.com/joBr99/nspanel-lovelace-ui/tree/main/nspanel-lovelace-ui"
|
url: "https://github.com/joBr99/nspanel-lovelace-ui/tree/main/nspanel-lovelace-ui"
|
||||||
arch:
|
arch:
|
||||||
- armhf
|
- armhf
|
||||||
|
|||||||
@@ -59,6 +59,12 @@ def on_message(client, userdata, msg):
|
|||||||
|
|
||||||
def get_config():
|
def get_config():
|
||||||
global settings
|
global settings
|
||||||
|
|
||||||
|
settings["mqtt_username"] = os.getenv('MQTT_USER')
|
||||||
|
settings["mqtt_password"] = os.getenv('MQTT_PASS')
|
||||||
|
settings["mqtt_port"] = os.getenv('MQTT_PORT')
|
||||||
|
settings["mqtt_server"] = os.getenv('MQTT_SERVER')
|
||||||
|
|
||||||
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 = 'config.yml'
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/with-contenv bashio
|
||||||
|
|
||||||
|
if [ -z ${STANDALONE+x} ]; then
|
||||||
|
export MQTT_USER=$(bashio::services "mqtt" "username")
|
||||||
|
export MQTT_PASS=$(bashio::services "mqtt" "password")
|
||||||
|
export MQTT_SERVER=$(bashio::services "mqtt" "host")
|
||||||
|
export MQTT_PORT=$(bashio::services "mqtt" "port")
|
||||||
|
else
|
||||||
|
echo "RUNNING IN STANDALONE MODE"
|
||||||
|
fi
|
||||||
|
|
||||||
#echo "All done!" > /share/example_addon_output.txt
|
|
||||||
export CONFIG_FILE=/share/config.yml
|
export CONFIG_FILE=/share/config.yml
|
||||||
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/config.yml.example $CONFIG_FILE
|
||||||
fi
|
fi
|
||||||
python main.py
|
sleep 100000
|
||||||
|
python /usr/bin/mqtt-manager/main.py
|
||||||
Reference in New Issue
Block a user