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!"