cluster-health: ha_integrations — skip disabled + ignored config entries

check_ha_integrations counted any config entry with state=not_loaded as a
problem, but HA marks intentionally-off entries that way too: disabled_by
set (user/integration disabled it) and source=="ignore" (a discovered
integration the user chose to ignore — never meant to load). On ha-sofia
2026-06-04 this false-WARNed on 6 entries that are all intentional —
wyoming faster-whisper/piper + ollama (disabled_by=user) and
mass_queue/dlna_dms(EMO-LAPTOP2)/yalexs_ble (source=ignore).

Skip disabled/ignored entries; only genuine setup_error/setup_retry/
not_loaded (without disabled/ignore) now flag. Verified: check #27 -> PASS
"All 96 integrations loaded".
This commit is contained in:
Viktor Barzin 2026-06-04 11:20:10 +00:00
parent dd2a8e640f
commit ae252f9116

View file

@ -1714,6 +1714,15 @@ for e in entries:
state = e.get("state", "loaded")
domain = e.get("domain", "?")
title = e.get("title", "?")
# Skip intentionally-off entries — they are NOT failures:
# * disabled_by set -> user/integration deliberately disabled it
# * source=="ignore" -> a discovered integration the user chose to ignore
# (HA's "don't suggest this" marker; never meant to load)
# Counting these produced a false "N not loaded" WARN (2026-06-04:
# wyoming/ollama were disabled_by=user; mass_queue/dlna_dms/yalexs_ble
# were source=ignore).
if e.get("disabled_by") is not None or e.get("source") == "ignore":
continue
if state == "setup_error" or state == "setup_retry":
setup_error.append(f"{domain} ({title})")
elif state == "not_loaded":