Files
alexei.dolgolyov 71b79cd919
All checks were successful
Validate / Hassfest (push) Successful in 1m19s
Move quiet hours from hub config to per-call service params
Quiet hours are now specified per send_telegram_notification call via
quiet_hours_start/quiet_hours_end params instead of being a hub-wide
integration option. This allows different automations to use different
quiet hours windows (or none at all).

- Remove quiet_hours_start/end from config options UI and const.py
- Add quiet_hours_start/end as optional HH:MM params on the service
- Remove ignore_quiet_hours param (omit quiet hours params to send immediately)
- Queue stores quiet_hours_end per item; each unique end time gets its
  own async_track_time_change timer for replay
- On startup, items whose quiet hours have passed are sent immediately
- Add async_remove_indices() to NotificationQueue for selective removal
- Timers are cleaned up when no more items need them

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 12:04:20 +03:00

271 lines
8.5 KiB
YAML

refresh:
name: Refresh
description: Force an immediate refresh of album data from Immich.
target:
entity:
integration: immich_album_watcher
domain: sensor
get_assets:
name: Get Assets
description: Get assets from the targeted album with optional filtering and ordering.
target:
entity:
integration: immich_album_watcher
domain: sensor
fields:
limit:
name: Limit
description: Maximum number of assets to return (1-100).
required: false
default: 10
selector:
number:
min: 1
max: 100
mode: slider
offset:
name: Offset
description: Number of assets to skip before returning results (for pagination). Use with limit to fetch assets in pages.
required: false
default: 0
selector:
number:
min: 0
mode: box
favorite_only:
name: Favorite Only
description: Filter to show only favorite assets.
required: false
default: false
selector:
boolean:
filter_min_rating:
name: Minimum Rating
description: Minimum rating for assets (1-5). Set to filter by rating.
required: false
default: 1
selector:
number:
min: 1
max: 5
mode: slider
order_by:
name: Order By
description: Field to sort assets by.
required: false
default: "date"
selector:
select:
options:
- label: "Date"
value: "date"
- label: "Rating"
value: "rating"
- label: "Name"
value: "name"
- label: "Random"
value: "random"
order:
name: Order
description: Sort direction.
required: false
default: "descending"
selector:
select:
options:
- label: "Ascending"
value: "ascending"
- label: "Descending"
value: "descending"
asset_type:
name: Asset Type
description: Filter assets by type (all, photo, or video).
required: false
default: "all"
selector:
select:
options:
- label: "All (no type filtering)"
value: "all"
- label: "Photos only"
value: "photo"
- label: "Videos only"
value: "video"
min_date:
name: Minimum Date
description: Filter assets created on or after this date (ISO 8601 format, e.g., 2024-01-01 or 2024-01-01T10:30:00).
required: false
selector:
text:
max_date:
name: Maximum Date
description: Filter assets created on or before this date (ISO 8601 format, e.g., 2024-12-31 or 2024-12-31T23:59:59).
required: false
selector:
text:
memory_date:
name: Memory Date
description: Filter assets by matching month and day, excluding the same year (memories filter like Google Photos). Provide a date in ISO 8601 format (e.g., 2024-02-14) to get assets from February 14th of previous years.
required: false
selector:
text:
city:
name: City
description: Filter assets by city name (case-insensitive substring match). Based on reverse geocoded location from asset GPS data.
required: false
selector:
text:
state:
name: State
description: Filter assets by state/region name (case-insensitive substring match). Based on reverse geocoded location from asset GPS data.
required: false
selector:
text:
country:
name: Country
description: Filter assets by country name (case-insensitive substring match). Based on reverse geocoded location from asset GPS data.
required: false
selector:
text:
send_telegram_notification:
name: Send Telegram Notification
description: Send a notification to Telegram (text, photo, video, document, or media group).
target:
entity:
integration: immich_album_watcher
domain: sensor
fields:
bot_token:
name: Bot Token
description: Telegram bot token. Uses configured token if not provided.
required: false
selector:
text:
chat_id:
name: Chat ID
description: Telegram chat ID to send to.
required: true
selector:
text:
assets:
name: Assets
description: "List of media assets to send. Each item should have 'url', optional 'type' (document/photo/video, default: document), optional 'content_type' (MIME type, e.g., 'image/jpeg'), and optional 'cache_key' (custom key for caching instead of URL). If empty, sends a text message. Photos and videos can be grouped; documents are sent separately."
required: false
selector:
object:
caption:
name: Caption
description: Caption text. For media, applied to first item. For empty URLs, this is the message text.
required: false
selector:
text:
multiline: true
reply_to_message_id:
name: Reply To Message ID
description: Message ID to reply to.
required: false
selector:
number:
mode: box
disable_web_page_preview:
name: Disable Web Page Preview
description: Disable link previews in text messages.
required: false
selector:
boolean:
parse_mode:
name: Parse Mode
description: How to parse the caption/text. Options are "HTML", "Markdown", "MarkdownV2", or empty string for plain text.
required: false
default: "HTML"
selector:
select:
options:
- label: "HTML"
value: "HTML"
- label: "Markdown"
value: "Markdown"
- label: "MarkdownV2"
value: "MarkdownV2"
- label: "Plain Text"
value: ""
max_group_size:
name: Max Group Size
description: Maximum number of media items per media group (2-10). Large lists will be split into multiple groups.
required: false
default: 10
selector:
number:
min: 2
max: 10
mode: slider
chunk_delay:
name: Chunk Delay
description: Delay in milliseconds between sending multiple media groups (0-60000). Useful for rate limiting.
required: false
default: 0
selector:
number:
min: 0
max: 60000
step: 100
unit_of_measurement: "ms"
mode: slider
wait_for_response:
name: Wait For Response
description: Wait for Telegram to finish processing before returning. Set to false for fire-and-forget (automation continues immediately).
required: false
default: true
selector:
boolean:
max_asset_data_size:
name: Max Asset Data Size
description: Maximum asset size in bytes. Assets exceeding this limit will be skipped. Leave empty for no limit.
required: false
selector:
number:
min: 1
max: 52428800
step: 1048576
unit_of_measurement: "bytes"
mode: box
send_large_photos_as_documents:
name: Send Large Photos As Documents
description: How to handle photos exceeding Telegram's limits (10MB or 10000px dimension sum). If true, send as documents. If false, skip oversized photos.
required: false
default: false
selector:
boolean:
chat_action:
name: Chat Action
description: Chat action to display while processing (typing, upload_photo, upload_video, upload_document). Set to empty to disable.
required: false
default: "typing"
selector:
select:
options:
- label: "Typing"
value: "typing"
- label: "Uploading Photo"
value: "upload_photo"
- label: "Uploading Video"
value: "upload_video"
- label: "Uploading Document"
value: "upload_document"
- label: "Disabled"
value: ""
quiet_hours_start:
name: Quiet Hours Start
description: "Start time for quiet hours (HH:MM format, e.g. 22:00). When set along with quiet_hours_end, notifications during this period are queued and sent when quiet hours end. Omit to send immediately."
required: false
selector:
text:
quiet_hours_end:
name: Quiet Hours End
description: "End time for quiet hours (HH:MM format, e.g. 08:00). Queued notifications will be sent at this time."
required: false
selector:
text: