From 369ffe3fb7add0b48c710db5ae25631dc444127a Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Sun, 1 Feb 2026 22:29:45 +0300 Subject: [PATCH] Rename time_pattern trigger to hourly_timer Renamed the shared time_pattern trigger from "periodic_summary" to "hourly_timer" since it serves both periodic summary and scheduled assets features. This makes the trigger's purpose clearer. Updated all references in should_send_periodic_summary, should_send_scheduled_assets, and the condition block. Co-Authored-By: Claude Opus 4.5 --- Common/Immich Album Watcher/blueprint.yaml | 14 +++++++------- manifest.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Common/Immich Album Watcher/blueprint.yaml b/Common/Immich Album Watcher/blueprint.yaml index 8a5c420..bf0a1e4 100644 --- a/Common/Immich Album Watcher/blueprint.yaml +++ b/Common/Immich Album Watcher/blueprint.yaml @@ -696,12 +696,12 @@ trigger: event_type: immich_album_watcher_album_deleted id: "album_deleted" - # Periodic summary trigger (time pattern) + # Hourly timer trigger for periodic summary and scheduled assets # Note: Uses template to dynamically set interval, but HA requires static value # so we trigger every hour and check interval in conditions - platform: time_pattern hours: "/1" - id: "periodic_summary" + id: "hourly_timer" # Manual trigger for testing periodic summary # Fire this event from Developer Tools > Events to test periodic summary immediately @@ -1029,7 +1029,7 @@ variables: # Manual test event (immich_album_watcher_test_periodic_summary) bypasses time check # If event data contains automation_id, only matching automations respond should_send_periodic_summary: > - {% if trigger.id == 'periodic_summary' and enable_periodic_summary %} + {% if trigger.id in ['hourly_timer', 'periodic_summary'] and enable_periodic_summary %} {% if trigger.platform == 'event' and trigger.event.event_type == 'immich_album_watcher_test_periodic_summary' %} {% set event_automation_id = trigger.event.data.automation_id | default('') %} {% if event_automation_id | length > 0 %} @@ -1088,7 +1088,7 @@ variables: {% else %} {{ true }} {% endif %} - {% elif trigger.id == 'periodic_summary' and enable_scheduled_assets %} + {% elif trigger.id == 'hourly_timer' and enable_scheduled_assets %} {% set current_hour = now().hour %} {% set start = scheduled_assets_start_hour | int %} {% set interval = scheduled_assets_interval_hours | int %} @@ -1110,14 +1110,14 @@ variables: # ============================================================================= condition: # Allow through if: - # 1. Periodic summary trigger and should send periodic summary or scheduled assets - # 2. Scheduled assets trigger + # 1. Hourly timer or periodic summary trigger and should send periodic summary or scheduled assets + # 2. Scheduled assets trigger (manual test) # 3. Event trigger and passes all event-based checks - condition: template value_template: > {% if trigger.id == 'scheduled_assets' %} {{ should_send_scheduled_assets }} - {% elif trigger.id == 'periodic_summary' %} + {% elif trigger.id in ['hourly_timer', 'periodic_summary'] %} {{ should_send_periodic_summary or should_send_scheduled_assets }} {% else %} {{ is_hub_tracked and is_album_tracked and should_notify }} diff --git a/manifest.json b/manifest.json index 7b12080..017b5bb 100644 --- a/manifest.json +++ b/manifest.json @@ -1,3 +1,3 @@ { - "version": "1.22.8" + "version": "1.22.9" }