Fix: Ensure UI settings map to environment variables - v1.2.1
This commit is contained in:
parent
dda9d6f8c9
commit
87becba6db
2 changed files with 16 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
name: "Newt Add-on"
|
||||
version: "1.2.0"
|
||||
version: "1.2.1"
|
||||
slug: "newt"
|
||||
description: "Runs Newt inside Home Assistant OS"
|
||||
arch:
|
||||
|
@ -15,13 +15,17 @@ privileged:
|
|||
- NET_ADMIN
|
||||
- DAC_READ_SEARCH
|
||||
options:
|
||||
PANGOLIN_ENDPOINT: "https://dash.opland.net"
|
||||
PANGOLIN_ENDPOINT: "https://yourendpoint.com"
|
||||
NEWT_ID: "your_newt_id"
|
||||
NEWT_SECRET: "your_newt_secret"
|
||||
schema:
|
||||
PANGOLIN_ENDPOINT: "str"
|
||||
NEWT_ID: "str"
|
||||
NEWT_SECRET: "str"
|
||||
environment:
|
||||
PANGOLIN_ENDPOINT: "{options[PANGOLIN_ENDPOINT]}"
|
||||
NEWT_ID: "{options[NEWT_ID]}"
|
||||
NEWT_SECRET: "{options[NEWT_SECRET]}"
|
||||
hassio_api: true
|
||||
homeassistant_api: true
|
||||
auth_api: true
|
||||
|
|
14
newt/run.sh
14
newt/run.sh
|
@ -3,10 +3,16 @@ set -e # Stop the script on errors
|
|||
|
||||
echo "🔹 Starting Newt inside Home Assistant OS..."
|
||||
|
||||
# Load configuration values
|
||||
PANGOLIN_ENDPOINT=${PANGOLIN_ENDPOINT:-"https://dash.opland.net"}
|
||||
NEWT_ID=${NEWT_ID:-"ru32vsg8ls5lx93"}
|
||||
NEWT_SECRET=${NEWT_SECRET:-"5rbqgpc292989uk9kz52hmypoyz6u9jf7k670fqja8p4un8o"}
|
||||
# Load configuration from environment variables set by Home Assistant
|
||||
PANGOLIN_ENDPOINT=${PANGOLIN_ENDPOINT}
|
||||
NEWT_ID=${NEWT_ID}
|
||||
NEWT_SECRET=${NEWT_SECRET}
|
||||
|
||||
# Validate if configuration values are provided
|
||||
if [[ -z "$PANGOLIN_ENDPOINT" || -z "$NEWT_ID" || -z "$NEWT_SECRET" ]]; then
|
||||
echo "❌ ERROR: Missing required configuration values!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ Configuration Loaded:"
|
||||
echo " PANGOLIN_ENDPOINT=$PANGOLIN_ENDPOINT"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue