Add Memory mode for On This Day scheduled assets
Add new "Memory (On This Day)" option to scheduled assets Order By selector. When selected, fetches photos taken on today's date in previous years using the on_this_day parameter from get_assets service. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -199,12 +199,19 @@ Sends scheduled notifications with existing assets from tracked albums. Uses the
|
||||
| `limit` | Maximum number of assets to fetch (1-100) |
|
||||
| `favorite_only` | Only fetch favorite assets |
|
||||
| `asset_type` | Filter by type (all, photo, video) |
|
||||
| `order_by` | Sort by (random, date, rating, name) |
|
||||
| `order_by` | Sort by (random, date, rating, name, memory) |
|
||||
| `order` | Sort direction (ascending, descending) |
|
||||
| `filter_min_rating` | Minimum rating filter (1-5, 0 = no filter) |
|
||||
| `min_date` | Assets created on or after this date (YYYY-MM-DD) |
|
||||
| `max_date` | Assets created on or before this date (YYYY-MM-DD) |
|
||||
|
||||
#### Memory Mode ("On This Day")
|
||||
|
||||
When `order_by` is set to `memory`, the blueprint fetches photos taken on today's date in previous years - similar to "On This Day" memories in photo apps. This mode automatically:
|
||||
|
||||
- Uses the `on_this_day` parameter with the current date
|
||||
- Sorts by date in ascending order (oldest first)
|
||||
|
||||
### Scheduled Assets Message Template Variables
|
||||
|
||||
| Variable | Description |
|
||||
|
||||
@@ -567,7 +567,9 @@ blueprint:
|
||||
|
||||
scheduled_assets_order_by:
|
||||
name: Order By
|
||||
description: "How to sort/select assets"
|
||||
description: >
|
||||
How to sort/select assets.
|
||||
Memory mode fetches photos taken on today's date in previous years ("On This Day").
|
||||
default: "random"
|
||||
selector:
|
||||
select:
|
||||
@@ -580,6 +582,8 @@ blueprint:
|
||||
value: "rating"
|
||||
- label: "Name"
|
||||
value: "name"
|
||||
- label: "Memory (On This Day)"
|
||||
value: "memory"
|
||||
|
||||
scheduled_assets_order:
|
||||
name: Order Direction
|
||||
@@ -1233,12 +1237,16 @@ action:
|
||||
# Build service data dynamically (omit optional params when not set)
|
||||
- variables:
|
||||
get_assets_data: >
|
||||
{% set is_memory_mode = scheduled_assets_order_by == 'memory' %}
|
||||
{% set data = {
|
||||
'limit': scheduled_assets_limit | int,
|
||||
'favorite_only': scheduled_assets_favorite_only,
|
||||
'order_by': scheduled_assets_order_by,
|
||||
'order': scheduled_assets_order
|
||||
'order_by': 'date' if is_memory_mode else scheduled_assets_order_by,
|
||||
'order': 'ascending' if is_memory_mode else scheduled_assets_order
|
||||
} %}
|
||||
{% if is_memory_mode %}
|
||||
{% set data = dict(data, on_this_day=now().strftime('%Y-%m-%d')) %}
|
||||
{% endif %}
|
||||
{% if scheduled_assets_type != 'all' %}
|
||||
{% set data = dict(data, asset_type=scheduled_assets_type) %}
|
||||
{% endif %}
|
||||
@@ -1470,12 +1478,16 @@ action:
|
||||
# Build service data dynamically (omit optional params when not set)
|
||||
- variables:
|
||||
combined_get_assets_data: >
|
||||
{% set is_memory_mode = scheduled_assets_order_by == 'memory' %}
|
||||
{% set data = {
|
||||
'limit': per_album_limit | int,
|
||||
'favorite_only': scheduled_assets_favorite_only,
|
||||
'order_by': scheduled_assets_order_by,
|
||||
'order': scheduled_assets_order
|
||||
'order_by': 'date' if is_memory_mode else scheduled_assets_order_by,
|
||||
'order': 'ascending' if is_memory_mode else scheduled_assets_order
|
||||
} %}
|
||||
{% if is_memory_mode %}
|
||||
{% set data = dict(data, on_this_day=now().strftime('%Y-%m-%d')) %}
|
||||
{% endif %}
|
||||
{% if scheduled_assets_type != 'all' %}
|
||||
{% set data = dict(data, asset_type=scheduled_assets_type) %}
|
||||
{% endif %}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "1.23.3"
|
||||
"version": "1.24.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user