Several minor updates to the existing blueprints

This commit is contained in:
2026-02-28 22:10:11 +03:00
parent eefc8993e3
commit 4c03bc849e
5 changed files with 162 additions and 27 deletions

View File

@@ -19,20 +19,9 @@ blueprint:
# Hub & Album Configuration
# -------------------------------------------------------------------------
albums_group:
name: "Hub & Albums"
name: "Albums"
collapsed: false
input:
hub_names:
name: Hub Names to Track
description: >
List of Immich hub/instance names to monitor.
Only events from matching hubs will trigger notifications.
Leave empty to track all hubs.
default: []
selector:
text:
multiple: true
album_id_entities:
name: Album ID Entities
description: >
@@ -489,6 +478,28 @@ blueprint:
selector:
boolean:
periodic_summary_interval:
name: Summary Interval (Days)
description: >
Number of days between periodic summaries.
Set to 1 for daily, 7 for weekly, etc.
default: 1
selector:
number:
min: 1
max: 365
step: 1
mode: box
periodic_summary_start_date:
name: Summary Start Date
description: >
The date from which to start counting the summary interval.
Summaries are sent on this date and every N days after.
default: "2025-01-01"
selector:
date:
periodic_notification_times:
name: Summary Notification Times
description: >
@@ -886,7 +897,7 @@ variables:
# ---------------------------------------------------------------------------
# Input Variables
# ---------------------------------------------------------------------------
hub_names: !input hub_names
album_id_entities: !input album_id_entities
automation_id: !input automation_id
@@ -929,6 +940,8 @@ variables:
# Periodic Summary Settings
enable_periodic_summary: !input enable_periodic_summary
periodic_summary_interval: !input periodic_summary_interval
periodic_summary_start_date: !input periodic_summary_start_date
periodic_summary_message_template: !input periodic_summary_message
periodic_album_template: !input periodic_album_template
periodic_summary_image_url: !input periodic_summary_image_url
@@ -1033,10 +1046,6 @@ variables:
# ---------------------------------------------------------------------------
# Computed Values
# ---------------------------------------------------------------------------
# Check if this hub should be tracked (empty list = track all)
is_hub_tracked: >
{{ hub_names | length == 0 or event_hub_name in hub_names }}
# Check if this album should be tracked (empty list = track all)
is_album_tracked: >
{{ album_ids | length == 0 or event_album_id in album_ids }}
@@ -1249,13 +1258,15 @@ variables:
# ---------------------------------------------------------------------------
# Periodic Summary Variables
# ---------------------------------------------------------------------------
# Check if periodic summary should run (at configured times)
# Manual test event (immich_album_watcher_test_periodic_summary) bypasses time check
# Check if periodic summary should run (at configured times and interval)
# Manual test event (immich_album_watcher_test_periodic_summary) bypasses interval check
# If event data contains automation_id, only matching automations respond
should_send_periodic_summary: >
{% if enable_periodic_summary %}
{% if trigger.id == 'periodic_summary_timer' %}
{{ true }}
{% set start = periodic_summary_start_date | as_datetime %}
{% set days_elapsed = (now().date() - start.date()).days %}
{{ days_elapsed >= 0 and days_elapsed % periodic_summary_interval == 0 }}
{% elif 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 %}
@@ -1384,7 +1395,7 @@ condition:
{% elif trigger.platform == 'event' and trigger.event.event_type in ['immich_album_watcher_test_periodic_summary', 'immich_album_watcher_test_scheduled_assets', 'immich_album_watcher_test_memory_mode'] %}
{{ should_send_periodic_summary or should_send_scheduled_assets or should_send_memory_mode }}
{% else %}
{{ is_hub_tracked and is_album_tracked and should_notify }}
{{ is_album_tracked and should_notify }}
{% endif %}
# =============================================================================
@@ -2512,7 +2523,6 @@ action:
- {{ event_people | join(', ') if event_people | length > 0 else '(none)' }}
**Filtering:**
- Is Hub Tracked: {{ is_hub_tracked }}
- Is Album Tracked: {{ is_album_tracked }}
- Should Notify: {{ should_notify }}
- Track Images: {{ track_images }}