mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Update 89-mqtt_autodiscover.sh
This commit is contained in:
@@ -11,10 +11,15 @@ if bashio::config.true 'mqtt_autodiscover'; then
|
||||
if ! bashio::services.available "mqtt"; then bashio::exit.nok "No internal MQTT service found. Please install Mosquitto broker"; fi
|
||||
# Get variables
|
||||
bashio::log.info "... MQTT service found, fetching server detail (you can enter those manually in your config file) ..."
|
||||
# spellcheck disable=SC2155
|
||||
export MQTT_HOST=$(bashio::services mqtt "host")
|
||||
# spellcheck disable=SC2155
|
||||
export MQTT_PORT=$(bashio::services mqtt "port")
|
||||
# spellcheck disable=SC2155
|
||||
export MQTT_SSL=$(bashio::services mqtt "ssl")
|
||||
# spellcheck disable=SC2155
|
||||
export MQTT_USERNAME=$(bashio::services mqtt "username")
|
||||
# spellcheck disable=SC2155
|
||||
export MQTT_PASSWORD=$(bashio::services mqtt "password")
|
||||
# Export variables
|
||||
for variables in "MQTT_HOST=$MQTT_HOST" "MQTT_PORT=$MQTT_PORT" "MQTT_SSL=$MQTT_SSL" "MQTT_USERNAME=$MQTT_USERNAME" "MQTT_PASSWORD=$MQTT_PASSWORD"; do
|
||||
|
||||
Reference in New Issue
Block a user