Add optional env vars config option (#29)

* Add optional env vars config option

* Don't use master builder

It's borked - https://github.com/home-assistant/builder/issues/212

* Use specific builder version
This commit is contained in:
Colin Seymour
2024-08-11 12:22:12 +01:00
committed by GitHub
parent 2b40dd2668
commit a73430c34d
6 changed files with 29 additions and 4 deletions
+8
View File
@@ -44,6 +44,14 @@ export DATABASE_HOST DATABASE_NAME DATABASE_PASS DATABASE_PORT DATABASE_USER \
DISABLE_MQTT MQTT_HOST MQTT_NAMESPACE MQTT_PASSWORD MQTT_TLS_ACCEPT_INVALID_CERTS \
MQTT_TLS MQTT_USERNAME IMPORT_DIR PORT TZ DEFAULT_GEOFENCE ENCRYPTION_KEY URL_PATH
# These are optional and applied last so we can override those set above if needed.
for env_var in $(bashio::config 'env_vars|keys'); do
name=$(bashio::config "env_vars[${env_var}].name")
value=$(bashio::config "env_vars[${env_var}].value")
bashio::log.debug "Setting Env Variable ${name} to ${value}"
export "${name}=${value}"
done
# Import dashboards
if bashio::config.true 'grafana_import_dashboards'; then
/dashboards.sh restore