My earlier setup used Homebridge and IFTTT to announce the prayer calls on my HomePods. This version achieves the same result with Homebridge and a WebCal calendar containing the prayer times.
The Homebridge Calendar Scheduler plugin reads the calendar events and exposes them in HomeKit as contact sensors. Each sensor can then trigger a HomeKit scene that plays the Athan on the selected HomePods.
I use the prayer calendar provided by https://prayerwebcal.dsultan.com.
Open the site and select the gear in the upper-right corner. Configure your location, prayer times, and the events you want included. I only wanted notifications for the prayer calls, so I disabled the other events, including sunrise and sunset.
When you are finished, copy the URL for your calendar. You will need it when you configure the Homebridge plugin.
Download and install Homebridge for your platform from https://homebridge.io. I run it on my Synology NAS. Once it is installed, the Homebridge interface should be available at http://localhost:8581/.
Open the Plugins page, search for “Homebridge Calendar Scheduler,” and install it.
Give the calendar a name. It will also appear in HomeKit as a sensor, although I do not use that general calendar sensor in this setup.
Paste the calendar URL from the prayer calendar site into the Calendar URL field.
The plugin can trigger on any active event, which would be enough if every prayer used the same automation. I wanted to use a different Athan for each prayer call, so I created a separate event configuration for every prayer. Fajr is one example of that pattern.
Save the plugin configuration and restart Homebridge. After the restart, the contact sensors should appear in the Apple Home app.
During testing, I enabled debug logging for the plugin. That made it easier to confirm when events were pulled from the calendar and which event or contact sensor had been triggered.
I keep all of my Homebridge virtual devices in a room called Homebridge. After Homebridge restarted, I could see the prayer events I had configured as contact sensors in that room.
Next, I created a custom scene for each prayer call. In each scene, I selected the HomePods that should play the Athan. Under Media, I chose Apple Music, searched for the Athan I wanted for that prayer, and saved the scene.
Finally, I created an automation for each prayer call. For the When condition, I selected the matching contact sensor and chose Opens. Under Select Accessories and Scenes, I selected the matching scene. For Fajr, for example, the Fajr contact sensor runs the Fajr scene.