home-assistant-apps/cookcli/rootfs/etc/cont-init.d/80-discovery.sh

16 lines
418 B
Bash

#!/usr/bin/with-contenv bashio
bashio::log.info "=== Annonce de la découverte CookCLI ==="
config=$(\
bashio::var.json \
host "$(bashio::addon.ip_address)" \
port "^9081" \
)
if bashio::discovery "cookcli" "${config}" > /dev/null; then
bashio::log.info "Successfully sent discovery information to Home Assistant."
else
bashio::log.error "Discovery message to Home Assistant failed!"
fi