$ show jumping2000/universal_notifier
Universal Notifier is a Home Assistant custom integration that acts as a centralized notification router. It exposes a single `universal_notifier.send` service that fans out messages to multiple channelsβtext (Telegram, mobile app) and voice (Alexa, Google Home via TTS)βwith context-aware features: time-of-day greetings, per-slot volume control, weekday/weekend Do Not Disturb schedules, priority bypass, and a FIFO async queue for serialized voice announcements. The integration also provides monitoring entities (volume sensor, family presence sensor, DND binary sensor) and runtime controls (priority volume select, text format select, voice buffer number, DND override switch, last-message text). Configuration is fully UI-driven via a multi-step config flow and an options menu for post-setup edits. Architecturally, the component is a typical Home Assistant custom component with modular entity platforms (sensor, binary_sensor, select, number, switch, text) and a core `__init__.py` that registers the service, manages the voice queue worker, and handles snapshot/resume of media players. The code is well-organized, uses standard HA patterns (config entries, entity registry, service registrations), and includes a solid test suite with high coverage. The main service handler is long and somewhat monolithic, but it is subdivided into labeled sections and handles many edge cases (e.g., `notify.send_message` target kwargs, Telegram chat IDs, MarkdownV2 escaping, SSML preservation for TTS). The utils module contains genuinely reusable text-processing and time-slot helper functions. Dependencies are minimal (only HA core), and the project uses `uv` for Python management and CI with GitHub Actions (tests, HACS validation, hassfest). It targets Python 3.13+ and requires HA 2025.12.1 or newer, indicating an up-to-date stack. External integrations like Telegram, Alexa Media Player, or TTS must be installed separately; this component merely routes to them. The repository is actively maintained with frequent releases and a changelog, and it supports multiple languages (READMEs and translations).
The LLM identified 1 files worth highlighting for reuse:
This module contains pure, self-contained helper functions that are not coupled to the HA integration internals. Key functions include `clean_text_for_tts()` which strips HTML and emoji while preserving SSML tags (important for Alexa/Google TTS), `escape_markdownv2()` that correctly handles Telegram's MarkdownV2 special characters while preserving bold/italic syntax, and `get_current_slot_info()` which resolves the active time slot (weekday/weekend, overnight wrap) with configurable volume. These functions demonstrate strong text-manipulation skills and could be extracted into any notification-related project. The `is_time_in_range()` function elegantly handles overnight ranges and is generically reusable.