From 18204e98c1184985e0ef67ce36842495654da6fc Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Sat, 31 Jan 2026 03:05:48 +0300 Subject: [PATCH] Add timeout for rest command --- Common/Immich Album Watcher.yaml | 4 ++++ manifest.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Common/Immich Album Watcher.yaml b/Common/Immich Album Watcher.yaml index ef2fce5..d327fd3 100644 --- a/Common/Immich Album Watcher.yaml +++ b/Common/Immich Album Watcher.yaml @@ -94,12 +94,14 @@ # immich_album_watcher_telegram_send_media_group: # url: "https://api.telegram.org/bot/sendMediaGroup" # method: POST +# timeout: 30 # content_type: "application/json" # payload: '{"chat_id": {{ chat_id }}, "media": {{ media | to_json }}, "reply_to_message_id": {{ reply_to_message_id }}}' # # - Replace with your actual bot token from BotFather # - TIP: Use secrets.yaml for the URL: url: !secret telegram_bot_send_media_group_url # - Media groups support 2-10 items (Telegram limit) +# - IMPORTANT: The timeout: 30 prevents HA from hanging if Telegram is slow # # Limitations: # - Only assets with valid public URLs will be sent @@ -460,11 +462,13 @@ blueprint: immich_album_watcher_telegram_send_media_group: url: "https://api.telegram.org/bot/sendMediaGroup" method: POST + timeout: 30 content_type: "application/json" payload: '{"chat_id": {{ chat_id }}, "media": {{ media | to_json }}, "reply_to_message_id": {{ reply_to_message_id }}}' Replace with your actual bot token from BotFather. TIP: Store the full URL in secrets.yaml and use: url: !secret telegram_bot_send_media_group_url + IMPORTANT: timeout: 30 prevents HA from hanging if Telegram is slow. Telegram limits media groups to 2-10 items. default: false selector: diff --git a/manifest.json b/manifest.json index 15f4366..79b9f72 100644 --- a/manifest.json +++ b/manifest.json @@ -1,3 +1,3 @@ { - "version": "1.10.1" + "version": "1.10.2" }