Files
haos-hacs-immich-album-watcher/custom_components/immich_album_watcher/services.yaml
alexei.dolgolyov 8714685d5e
All checks were successful
Validate / Hassfest (push) Successful in 3s
Improve Telegram error handling and unify asset data structure
- Remove photo downscaling logic in favor of cleaner error handling
- Add intelligent Telegram API error logging with diagnostics and suggestions
- Define Telegram photo limits as global constants (TELEGRAM_MAX_PHOTO_SIZE, TELEGRAM_MAX_DIMENSION_SUM)
- Add photo_url support for image assets (matching video_url for videos)
- Unify asset detail building with shared _build_asset_detail() helper method
- Enhance get_assets service to return complete asset data matching events
- Simplify attribute naming by removing redundant asset_ prefix from values

BREAKING CHANGE: Asset attribute keys changed from "asset_type", "asset_filename"
to simpler "type", "filename" for consistency and cleaner JSON responses

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-31 23:40:19 +03:00

175 lines
5.1 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:
count:
name: Count
description: Maximum number of assets to return (1-100).
required: false
default: 10
selector:
number:
min: 1
max: 100
mode: slider
filter:
name: Filter
description: Filter assets by type (none, favorite, or rating-based).
required: false
default: "none"
selector:
select:
options:
- label: "None (no filtering)"
value: "none"
- label: "Favorites only"
value: "favorite"
- label: "By minimum rating"
value: "rating"
filter_min_rating:
name: Minimum Rating
description: Minimum rating for assets (1-5). Only used when filter is set to 'rating'.
required: false
default: 1
selector:
number:
min: 1
max: 5
mode: slider
order:
name: Order
description: Sort order for assets by creation date.
required: false
default: "descending"
selector:
select:
options:
- label: "Ascending (oldest first)"
value: "ascending"
- label: "Descending (newest first)"
value: "descending"
- label: "Random"
value: "random"
send_telegram_notification:
name: Send Telegram Notification
description: Send a notification to Telegram (text, photo, video, 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:
urls:
name: URLs
description: List of media URLs to send. Each item should have 'url' and 'type' (photo/video). If empty, sends a text message. Large lists are automatically split into multiple media groups.
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, downsize to fit limits.
required: false
default: false
selector:
boolean: