Add MQTT auto discovery configuration options (#162)

Co-authored-by: Colin Seymour <colin@symr.io>
This commit is contained in:
Aulon MujajandColin Seymour authored and GitHub committed 2026-11-30 17:08:58 +00:00
1 parent eb95a60577
commit a038a12cae
4 files changed
+15 -1

No files matched your search

+8 -1
View File
@@ -18,6 +18,8 @@ MQTT_PASSWORD=$(bashio::config 'mqtt_pass')
MQTT_TLS_ACCEPT_INVALID_CERTS=$(bashio::config 'mqtt_tls_accept_invalid_certs')
MQTT_TLS=$(bashio::config 'mqtt_tls')
MQTT_USERNAME=$(bashio::config 'mqtt_user')
MQTT_HOME_ASSISTANT_DISCOVERY=$(bashio::config 'mqtt_home_assistant_discovery')
MQTT_HOME_ASSISTANT_DISCOVERY_PREFIX="homeassistant"
# Other things
IMPORT_DIR=$(bashio::config 'import_dir')
@@ -40,9 +42,14 @@ ingress_entry=$(curl -X GET \
export URL_PATH=$ingress_entry
addon_slug=$(bashio::addons self addons.self.slug .slug)
MQTT_HOME_ASSISTANT_DISCOVERY_URL="homeassistant://app/${addon_slug}"
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
MQTT_TLS MQTT_USERNAME IMPORT_DIR PORT TZ DEFAULT_GEOFENCE ENCRYPTION_KEY URL_PATH \
MQTT_HOME_ASSISTANT_DISCOVERY MQTT_HOME_ASSISTANT_DISCOVERY_PREFIX \
MQTT_HOME_ASSISTANT_DISCOVERY_URL
# 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