This blueprint automatically plays the athan (call to prayer) โ or any sound file you choose โ on any media player at each prayer time, using the official Islamic Prayer Times integration. It also sends an actionable push notification to any number of phones with a Stop button, and gives you a dashboard toggle to stop playback at any moment.
No cloud services, no custom components โ just the built-in integration, your speaker, and the companion app.
Features
- Pick your prayers: Select exactly which prayer times trigger the athan. Want to skip Fajr? Simply donโt select it โ no YAML editing needed.
- Gentle volume fade-in: Playback starts silent and ramps up to your chosen volume over a configurable number of steps. Great for early prayers.
- Actionable notifications (iOS & Android): Every selected phone gets a notification with a Stop button (long-press the notification to reveal it). Pressing Stop on any phone stops playback for everyone.
- Tap-to-stop or tap-to-open: By default, tapping the notification body stops the athan. Or point it at a dashboard view (e.g. a speaker control pop-up) instead.
- Dashboard stop toggle: A simple
input_booleanturns ON while the athan plays โ add it to your dashboard and switching it off stops playback instantly. - Optional enable/kill switch: A second toggle lets you pause the whole setup (e.g. when travelling) without disabling the automation.
- Multi-device: Select as many phones as you like in one picker โ no notify groups to configure.
- Custom notification sound (iOS): Use a short athan clip as the notification sound itself.
- Critical alerts (iOS, optional): Bypass silent mode / Do Not Disturb so the notification always sounds.
- Multilingual: Notification title, message, and button label are fully customizable, with
{{ prayer_name }}(English),{{ prayer_name_ar }}(Arabic), and{{ speaker_name }}template placeholders built in. - Reusable: Create multiple automations from the same blueprint โ e.g. a separate Fajr instance with a different file, lower volume, and a slower fade.
Prerequisites
- The Islamic Prayer Times integration installed and configured (Settings โ Devices & Services โ Add Integration). Pick the calculation method that matches your local mosque timings โ the integration also supports per-prayer minute adjustments.
- An input_boolean helper for the โplayingโ toggle (Settings โ Devices & Services โ Helpers โ Create helper โ Toggle).
- (Optional) A second input_boolean as an enable/disable switch.
- Your athan sound file in your HA media folder, e.g.
/config/media/athan.mp3โ media pathmedia-source://media_source/local/athan.mp3. - The Home Assistant Companion App on the phone(s).
Installation
The easiest way is the import button:
Manual installation:
- Go to your
config/blueprints/automationfolder and create a subfolder (e.g.athan). - Create a file called
prayer_times_athan_player.yamland paste the code below. - Go to Developer Tools โ YAML โ Reload Automations (or restart).
- Settings โ Automations & Scenes โ Blueprints โ Prayer Times Athan Player โ Create Automation.
Setup walkthrough
- Create the playing toggle: Settings โ Devices & Services โ Helpers โ Create helper โ Toggle. Name it e.g. โAthan Playingโ.
Open your Home Assistant instance and show your helper entities.
- Create an automation from the blueprint and fill in:
- Speaker โ the media player that plays the athan (Sonos, Google/Nest, Alexa via media player, etc.)
- Prayer time sensors โ select the prayers you want (skip any by leaving it unselected)
- Playing toggle โ the helper from step 1
- Phones โ every device that should get the notification
- Everything else has working defaults โ file path, volume, fade, notification texts โ all editable per automation.
- (Optional) Add the playing toggle (and enable switch) to your dashboard as stop/enable buttons.
Tips & customization
Arabic notifications โ enter these in the inputs:
| Input | Value |
|---|---|
| Notification title | ๐ ุญุงู ููุช ุตูุงุฉ {{ prayer_name_ar }} |
| Notification message | ุงูุฃุฐุงู ููุจุซ ุงูุขู ุนูู ุงูุณู
ุงุนุฉ |
| Stop button label | ุฅููุงู ุงูุฃุฐุงู |
Custom notification sound (iOS): create a clip under 30 seconds (iOS hard limit) in .wav/.aiff/.caf, get it onto each phone, then HA app โ Settings โ Companion App โ Notifications โ Sounds โ Import. Enter the filename (e.g. athan_short.wav) in the blueprint. Phones without the file fall back to the default sound automatically.
Different Fajr experience: create a second automation from this blueprint with only the Fajr sensor selected, a different sound file, lower target volume, and a slower fade (e.g. 20 steps ร 1000 ms).
Tap opens your dashboard instead of stopping: set the โNotification tap actionโ input to a path like /lovelace/0#speakercontrol.
FAQ
The notification Stop button doesnโt show? On iOS, action buttons only appear after you long-press the notification (or swipe down on it from the Lock Screen). Thatโs an iOS limitation, not the blueprint.
Playback doesnโt stop when the file ends? The blueprint waits for the media player to report idle/paused. Some players chain into a queue instead โ the built-in 1-hour timeout still cleans up, but if your player misbehaves, check that youโre playing a single file, not a playlist.
Critical alerts are loud! Thatโs the point
โ they bypass silent mode and Focus at a forced volume. Leave the toggle off if you donโt want that.
I renamed my phone and notifications stopped. The notify service name is derived from the device name in the companion app. After renaming, just reselect the device in the automation.
The Blueprint
yaml
https://raw.githubusercontent.com/kaboomAE/Dartec_blueprints/main/prayer_times_athan_player.yaml
If you find this useful, a
on the post helps others find it. Feedback and feature ideas welcome โ reply below!