mirror of
https://github.com/lildude/ha-addon-teslamate.git
synced 2026-10-13 13:10:30 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user