Skip to content

Release 1.0.1

Choose a tag to compare

@SalvatoreITA SalvatoreITA released this 17 Jan 18:20
8cba5ea

v1.0.1 - Major Rewrite: Async Core & Advanced Media
Questa versione rappresenta una riscrittura completa del componente. Il codice è stato modernizzato per gestire le notifiche in modo asincrono (non bloccante), supportare file locali, album e garantire che le notifiche arrivino sempre, anche in caso di errori.

⚡ Core & Performance
Architettura Asincrona: Migrazione completa da call a async_call. Il componente non blocca più l'event loop di Home Assistant durante l'invio di file pesanti o quando la connessione con Telegram è lenta.

Gestione Errori (Fallback): Mai più notifiche perse.

Se l'invio di un media fallisce (es. file troppo grande), viene inviato un messaggio di testo di avviso.

Se un messaggio di testo fallisce, il contenuto viene salvato in un file .txt e inviato come documento.

📸 Gestione Media Avanzata
Supporto Ibrido (File vs URL): Il componente ora distingue intelligentemente tra:

Link Web: (es. http://...) scaricati direttamente da Telegram.

File Locali: (es. /config/www/foto.jpg, /tmp/video.mp4) caricati fisicamente dal disco di Home Assistant (Upload).

Invio Messaggi Multipli: Introdotto il supporto alla chiave media_group.

Nuovi Tipi di Media: Supporto nativo aggiunto per:

document (PDF, TXT, Log)

audio

animation (GIF/MP4 senza audio)

Smart Captions: Il title e il message vengono integrati automaticamente nella didascalia (caption) di foto e video. Negli album, vengono applicati solo al primo elemento per pulizia.

📝 Formattazione Intelligente
Auto-Detect HTML: Non serve più specificare parse_mode. Se il testo contiene tag come , o , il componente passa automaticamente alla modalità HTML.

MarkdownV2 Safe: Se si usa Markdown, il componente include un helper per l'escape dei caratteri speciali, prevenendo errori di invio dovuti a simboli non chiusi.

Auto-Split Messaggi Lunghi: I messaggi superiori a 4096 caratteri vengono divisi automaticamente in più parti (chunks) per aggirare i limiti di Telegram.

⌨️ Interattività (Tastiere)
Supporto Reply Markup Completo: Piena compatibilità con:

inline_keyboard (Bottoni sotto il messaggio).

keyboard (Menu persistente/tastiera personalizzata).

remove_keyboard e force_reply.


v1.0.1 - Major Rewrite: Async Core & Advanced Media
This version represents a complete rewrite of the component. The code has been modernized to handle notifications asynchronously (non-blocking), support local files and albums, and guarantee that notifications always arrive, even in case of errors.

⚡ Core & Performance
Async Architecture: Complete migration from call to async_call. The component no longer blocks the Home Assistant event loop during heavy file uploads or when the Telegram connection is slow.

Error Handling (Fallback): Never lose a notification again.

If media sending fails (e.g., file too large), a warning text message is sent instead.

If a text message fails, the content is saved to a .txt file and sent as a document.

📸 Advanced Media Handling
Hybrid Support (File vs URL): The component now intelligently distinguishes between:

Web Links: (e.g., http://...) downloaded directly by Telegram.

Local Files: (e.g., /config/www/photo.jpg, /tmp/video.mp4) physically uploaded from the Home Assistant disk.

Media Group Support: Introduced support for the media_group key (sends multiple files sequentially).

New Media Types: Native support added for:

document (PDF, TXT, Log)

audio

animation (GIF/MP4 without audio)

Smart Captions: The title and message are automatically integrated into the photo/video caption. For albums, they are applied only to the first element to keep the chat clean.

📝 Smart Formatting
Auto-Detect HTML: There is no longer a need to specify parse_mode. If the text contains tags like , , or , the component automatically switches to HTML mode.

MarkdownV2 Safe: If using Markdown, the component includes a helper to escape special characters, preventing sending errors due to unclosed symbols.

Auto-Split Long Messages: Messages exceeding 4096 characters are automatically divided into multiple parts (chunks) to bypass Telegram limits.

⌨️ Interactivity (Keyboards)
Full Reply Markup Support: Full compatibility with:

inline_keyboard (Buttons under the message).

keyboard (Persistent menu/custom keyboard).

remove_keyboard and force_reply.