mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-21 08:11:50 +02:00
mqtt autodiscovery
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
#####################
|
||||
|
||||
if bashio::config.true 'mqtt_autodiscover'; then
|
||||
bashio::log.info "mqtt_autodiscover is defined in options, attemption autodiscovery..."
|
||||
bashio::log.info "mqtt_autodiscover is defined in options, attempting autodiscovery..."
|
||||
# Check if available
|
||||
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 ..."
|
||||
bashio::log.info "... MQTT service found, fetching server detail (you can enter those manually in your config file) ..."
|
||||
export MQTT_HOST=$(bashio::services mqtt "host")
|
||||
export MQTT_PORT=$(bashio::services mqtt "port")
|
||||
export MQTT_SSL=$(bashio::services mqtt "ssl")
|
||||
|
||||
Reference in New Issue
Block a user