Consolider l'envoi de notifications

This commit is contained in:
2026-04-20 13:52:39 +02:00
parent c0b0770ddf
commit b00879cdfa
4 changed files with 27 additions and 14 deletions

View File

@@ -308,7 +308,7 @@ def depassement_depuis_30min(site: str, sonde: str, seuil: float) -> bool:
def send_synology_chat(message: str, *, username: str | None = None) -> bool:
webhook = (
_env_str(f"SYNO_CHAT_WEBHOOK_{SITE}") or
_env_str(f"SYNO_CHAT_WEBHOOK_{SITE.upper()}") or
_env_str(f"SYNO_CHAT_WEBHOOK_MONITOR_SACLAY") or
_env_str("SYNO_CHAT_WEBHOOK")
)
if not webhook: