Add discovery init script

This commit is contained in:
Timmo 2019-10-12 22:04:41 +01:00
parent a150809b0e
commit 17a033c7d8

View file

@ -0,0 +1,18 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: Home Panel
# Sends discovery information to Home Assistant.
# ==============================================================================
declare config
config=$(\
bashio::var.json \
host "127.0.0.1" \
port "^45158" \
)
if bashio::discovery "home_panel" "${config}" > /dev/null; then
bashio::log.info "Successfully send discovery information to Home Assistant."
else
bashio::log.error "Discovery message to Home Assistant failed!"
fi