From 088badf920909ae21544385f0e122df380827eff Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Sun, 13 Sep 2026 15:08:13 +0000 Subject: [PATCH] Actualiser cookcli/rootfs/etc/cont-init.d/80-discovery.sh --- cookcli/rootfs/etc/cont-init.d/80-discovery.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cookcli/rootfs/etc/cont-init.d/80-discovery.sh b/cookcli/rootfs/etc/cont-init.d/80-discovery.sh index 5167a0b..32f200a 100644 --- a/cookcli/rootfs/etc/cont-init.d/80-discovery.sh +++ b/cookcli/rootfs/etc/cont-init.d/80-discovery.sh @@ -2,7 +2,14 @@ bashio::log.info "=== Annonce de la découverte CookCLI ===" -bashio::discovery.set "cookcli" \ - '{"host": "'"$(bashio::addon.ip_address)"'", "port": 9081, "ssl": false}' +config=$(\ + bashio::var.json \ + host "http://$(bashio::addon.ip_address)" \ + port "^9081" \ +) -bashio::log.info "✅ Découverte annoncée sur le port 9081" \ No newline at end of file +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