Commit Graph

50 Commits

Author SHA1 Message Date
c29fc2fbcf Add Telegram file ID caching and reverse geocoding fields
All checks were successful
Validate / Hassfest (push) Successful in 3s
Implement caching for Telegram file_ids to avoid re-uploading the same media.
Cached IDs are reused for subsequent sends, improving performance significantly.
Added configurable cache TTL option (1-168 hours, default 48).

Also added city, state, and country fields from Immich reverse geocoding
to asset data in events and get_assets service.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 03:12:05 +03:00
011f105823 Add geolocation (latitude/longitude) to asset data
All checks were successful
Validate / Hassfest (push) Successful in 3s
Expose GPS coordinates from EXIF data in asset responses. The latitude
and longitude fields are included in get_assets service responses and
event data when available.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 02:29:56 +03:00
ee45fdc177 Fix the services API
All checks were successful
Validate / Hassfest (push) Successful in 3s
2026-02-01 02:22:52 +03:00
4b0f3b8b12 Enhance get_assets service with flexible filtering and sorting
All checks were successful
Validate / Hassfest (push) Successful in 5s
- Replace filter parameter with independent favorite_only boolean
- Add order_by parameter supporting date, rating, and name sorting
- Rename count to limit for clarity
- Add date range filtering with min_date and max_date parameters
- Add asset_type filtering for photos and videos
- Update README with language support section and fixed sensor list
- Add translations for all new parameters

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
v2.2.0
2026-02-01 01:39:04 +03:00
e5e45f0fbf Add asset preprocessing filter and enhance asset data
All checks were successful
Validate / Hassfest (push) Successful in 3s
Features:
- Filter unprocessed assets from events and get_assets service
  - Videos require completed transcoding (encodedVideoPath)
  - Photos require generated thumbnails (thumbhash)
- Add photo_url field for images (preview-sized thumbnail)
- Simplify asset attribute names (remove asset_ prefix)
- Prioritize user-added descriptions over EXIF descriptions

Documentation:
- Update README with new asset fields and preprocessing note
- Update services.yaml parameter descriptions

Version: 2.1.0

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
v2.1.0
2026-02-01 01:14:21 +03:00
8714685d5e Improve Telegram error handling and unify asset data structure
All checks were successful
Validate / Hassfest (push) Successful in 3s
- 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
bbcd97e1ac Expose favorite and asset rating to asset data
All checks were successful
Validate / Hassfest (push) Successful in 3s
2026-01-31 18:14:33 +03:00
04dd63825c Add intelligent handling for oversized photos in Telegram service
All checks were successful
Validate / Hassfest (push) Successful in 3s
Implements send_large_photos_as_documents parameter to handle photos
exceeding Telegram's limits (10MB file size or 10000px dimension sum).

Features:
- Automatic detection of oversized photos using file size and PIL-based
  dimension checking
- Two handling modes:
  * send_large_photos_as_documents=false (default): Intelligently
    downsizes photos using Lanczos resampling and progressive JPEG
    quality reduction to fit within Telegram limits
  * send_large_photos_as_documents=true: Sends oversized photos as
    documents to preserve original quality
- For media groups: separates oversized photos and sends them as
  documents after the main group, or downsizes them inline
- Maintains backward compatibility with existing max_asset_data_size
  parameter for hard size limits

This resolves PHOTO_INVALID_DIMENSIONS errors for large images like
26MP photos while giving users control over quality vs. file size.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-31 18:03:50 +03:00
71d3714f6a Add max_asset_data_size parameter to Telegram service
All checks were successful
Validate / Hassfest (push) Successful in 3s
Introduces optional max_asset_data_size parameter (in bytes) to filter
out oversized photos and videos from Telegram notifications. Assets
exceeding the limit are skipped with a warning, preventing
PHOTO_INVALID_DIMENSIONS errors for large images (e.g., 26MP photos).

Changes:
- Add max_asset_data_size parameter to service signature
- Implement size checking for single photos/videos
- Filter oversized assets in media groups
- Update services.yaml, translations, and documentation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-31 17:31:14 +03:00
459f5ef1e5 Bump version to 2.0.0 (major release)
All checks were successful
Validate / Hassfest (push) Successful in 3s
v2.0.0
2026-01-31 17:07:40 +03:00
42b2d912c9 Add non-blocking mode support to Telegram notification service
All checks were successful
Validate / Hassfest (push) Successful in 3s
- Add `wait_for_response` parameter (default: true) for fire-and-forget operation
- Change supports_response to OPTIONAL to allow both modes
- Refactor execution logic into `_execute_telegram_notification` method
- Background tasks created with `hass.async_create_task` when wait_for_response=false
- Update documentation with non-blocking mode example and response behavior

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-31 15:53:35 +03:00
2007b020ba Add parse_mode to service call API
All checks were successful
Validate / Hassfest (push) Successful in 3s
2026-01-31 15:32:20 +03:00
2ae706d700 Enhance Telegram service with multi-format support and chunking
All checks were successful
Validate / Hassfest (push) Successful in 2s
Renamed send_telegram_media_group to send_telegram_notification with expanded capabilities:
- Text messages (when urls is empty)
- Single photo/video (uses sendPhoto/sendVideo APIs)
- Media groups (uses sendMediaGroup API)
- Automatic chunking for unlimited media URLs
- Smart optimization: single-item chunks use appropriate single-item APIs

New parameters:
- max_group_size (2-10, default 10): control items per media group
- chunk_delay (0-60000ms, default 0): delay between chunks for rate limiting
- disable_web_page_preview: disable link previews in text messages

The service now intelligently selects the most efficient Telegram API endpoint based on content type and chunk size, with comprehensive error handling and logging.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-31 14:33:18 +03:00
1cc5d7cc7d Remove album name from entity names
All checks were successful
Validate / Hassfest (push) Successful in 3s
2026-01-31 04:49:53 +03:00
5d878cfbd0 Add translation for telegram service
All checks were successful
Validate / Hassfest (push) Successful in 3s
2026-01-31 04:44:50 +03:00
c7ed037e2e Document Telegram integration and media group service
All checks were successful
Validate / Hassfest (push) Successful in 3s
- Add Telegram Bot Token to configuration options
- Document send_telegram_media_group service with examples
- Update get_recent_assets example with entity target

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 04:20:43 +03:00
d26e212c82 Add GitHub community files
All checks were successful
Validate / Hassfest (push) Successful in 3s
- CONTRIBUTING.md with development guidelines
- Issue templates for bugs and feature requests
- Pull request template

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 04:16:17 +03:00
02c0535f50 Add telegram media sender as service. Also fixed the via_device warnings that would break in HA 2025.12.0.
All checks were successful
Validate / Hassfest (push) Successful in 3s
v1.4.0
2026-01-31 04:07:13 +03:00
c570e157be Skip the validation step on Gitea
All checks were successful
Validate / Hassfest (push) Successful in 4s
2026-01-31 01:59:05 +03:00
56d249b598 No luck, let's run it at least on GitHub
Some checks failed
Validate / Hassfest (push) Failing after 4s
2026-01-31 01:54:20 +03:00
ebed587f6f Let's try this actions one more time
Some checks failed
Validate / Hassfest (push) Failing after 1m4s
2026-01-31 01:53:00 +03:00
a89d45268d Attemp to also support Gitea for actions
Some checks failed
Validate / Hassfest (push) Failing after 1m25s
2026-01-31 01:50:02 +03:00
950fe0fd91 Add hassfest validation action
Some checks failed
Validate / Hassfest (push) Failing after 19s
2026-01-31 01:39:28 +03:00
91c30e086d Actualize entities and asset fields info in README.md 2026-01-30 23:45:34 +03:00
6f39a8175d Update root README.md 2026-01-30 23:41:52 +03:00
e6619cb1c5 Album ID sensor now also exposes album name v1.3.0 2026-01-30 15:48:16 +03:00
eedc7792c8 Add album id sensor that has primary share link url attribute 2026-01-30 15:41:58 +03:00
3a0573e432 Add persistent storage 2026-01-30 15:30:05 +03:00
7c53110c07 Update README.md as we only have one integration now 2026-01-30 14:54:03 +03:00
03430df5fb Add license file and improve CLAUDE.md context file 2026-01-30 14:50:01 +03:00
2ca26e178a Add CLAUDE.md with versioning rules 2026-01-30 14:45:46 +03:00
847c39eaa8 Add a note about handy blueprint 2026-01-30 14:42:17 +03:00
9013c5e0c3 Update README to use github remote url 2026-01-30 14:40:50 +03:00
557ec91f05 Update remote url for HACS config and README 2026-01-30 14:12:46 +03:00
436139ede9 Prepare the integration for HACS installation 2026-01-30 14:11:28 +03:00
f622a25484 Add playback url 2026-01-30 05:23:15 +03:00
a4738dfd80 Add support for asset download url 2026-01-30 05:00:18 +03:00
5d2f4c7edf Add link generation buttons 2026-01-30 03:45:06 +03:00
82f293d0df Add hub support 2026-01-30 02:57:45 +03:00
60573374a4 Implement hub and subenty approach based on telegram bot integration implementation 2026-01-30 02:39:59 +03:00
c8bd475a52 Add entity picker support 2026-01-30 02:05:10 +03:00
17c1792637 Remove repository structure from README 2026-01-30 01:36:30 +03:00
c49392af51 Add support for asset_description assert metadata 2026-01-30 01:33:22 +03:00
69b344142f Allow to track protected links and change protected link password (if available) 2026-01-30 01:21:09 +03:00
9a768b24f8 More inprovements on Immich integration 2026-01-30 00:46:31 +03:00
7b54465c5f Updates README(s) 2026-01-29 21:17:16 +03:00
b7041cab1c Add new sensors to the Immich album tracker integration 2026-01-29 21:11:43 +03:00
b14d2e6936 Add album last update time sensor 2026-01-29 20:45:18 +03:00
60200ff764 Added proper russian locale 2026-01-29 20:37:57 +03:00
4466b9e102 Add Immich Album Watcher integration 2026-01-29 20:06:55 +03:00