From cc1cab708851638dde601ba9f0ece517e56d5bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Ferdinand?= Date: Fri, 7 Mar 2025 23:06:50 +0100 Subject: [PATCH] Fix bashio issue and use environment variables - v1.1.5 --- newt/config.yaml | 2 +- newt/run.sh | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/newt/config.yaml b/newt/config.yaml index 9255f8e..6b794d8 100644 --- a/newt/config.yaml +++ b/newt/config.yaml @@ -1,5 +1,5 @@ name: "Newt Add-on" -version: "1.1.4" +version: "1.1.5" slug: "newt" description: "Runs the Newt container inside Home Assistant using Supervisor API" arch: diff --git a/newt/run.sh b/newt/run.sh index 29ef782..bf6c006 100644 --- a/newt/run.sh +++ b/newt/run.sh @@ -1,12 +1,15 @@ #!/usr/bin/env bash +source /usr/lib/bashio/bashio.sh + set -e # Stop script on errors echo "🔹 Starting Newt container using Home Assistant Supervisor API..." # Load config from Home Assistant options -PANGOLIN_ENDPOINT=$(bashio::config 'PANGOLIN_ENDPOINT') -NEWT_ID=$(bashio::config 'NEWT_ID') -NEWT_SECRET=$(bashio::config 'NEWT_SECRET') +PANGOLIN_ENDPOINT=${PANGOLIN_ENDPOINT:-"https://dash.opland.net"} +NEWT_ID=${NEWT_ID:-"ru32vsg8ls5lx93"} +NEWT_SECRET=${NEWT_SECRET:-"5rbqgpc292989uk9kz52hmypoyz6u9jf7k670fqja8p4un8o"} + if [[ -z "$PANGOLIN_ENDPOINT" || -z "$NEWT_ID" || -z "$NEWT_SECRET" ]]; then echo "❌ ERROR: Missing configuration values!"