๐Ÿ•Œ Prayer Times Athan Player โ€” Automatic Athan on Your Speakers (Islamic Prayer Times)

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.

:sparkles: 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_boolean turns 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.

:gear: Prerequisites

  1. 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.
  2. An input_boolean helper for the โ€œplayingโ€ toggle (Settings โ†’ Devices & Services โ†’ Helpers โ†’ Create helper โ†’ Toggle).
  3. (Optional) A second input_boolean as an enable/disable switch.
  4. Your athan sound file in your HA media folder, e.g. /config/media/athan.mp3 โ†’ media path media-source://media_source/local/athan.mp3.
  5. The Home Assistant Companion App on the phone(s).

:rocket: Installation

The easiest way is the import button:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Manual installation:

  1. Go to your config/blueprints/automation folder and create a subfolder (e.g. athan).
  2. Create a file called prayer_times_athan_player.yaml and paste the code below.
  3. Go to Developer Tools โ†’ YAML โ†’ Reload Automations (or restart).
  4. Settings โ†’ Automations & Scenes โ†’ Blueprints โ†’ Prayer Times Athan Player โ†’ Create Automation.

:puzzle_piece: Setup walkthrough

  1. 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.

  1. 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
  2. Everything else has working defaults โ€” file path, volume, fade, notification texts โ€” all editable per automation.
  3. (Optional) Add the playing toggle (and enable switch) to your dashboard as stop/enable buttons.

:light_bulb: 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.

:red_question_mark: 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 :slightly_smiling_face: โ€” 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.

:memo: The Blueprint

yaml

https://raw.githubusercontent.com/kaboomAE/Dartec_blueprints/main/prayer_times_athan_player.yaml

If you find this useful, a :heart: on the post helps others find it. Feedback and feature ideas welcome โ€” reply below!