Commit Graph

93 Commits

Author SHA1 Message Date
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