Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zubir2k/homeassistantadzan
🕋 Automation for Malaysia Adzan (Muslim call to prayer) based on JAKIM API. Give support by pressing the ⭐ button. Jazakallahu khair
https://github.com/zubir2k/homeassistantadzan
automation azan home-assistant home-assistant-config home-automation homeassistant integration jakim malaysia prayer-times template yaml
Last synced: 2 months ago
JSON representation
🕋 Automation for Malaysia Adzan (Muslim call to prayer) based on JAKIM API. Give support by pressing the ⭐ button. Jazakallahu khair
- Host: GitHub
- URL: https://github.com/zubir2k/homeassistantadzan
- Owner: zubir2k
- License: unlicense
- Created: 2021-07-03T15:57:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-14T15:01:37.000Z (about 1 year ago)
- Last Synced: 2024-02-15T09:47:21.882Z (about 1 year ago)
- Topics: automation, azan, home-assistant, home-assistant-config, home-automation, homeassistant, integration, jakim, malaysia, prayer-times, template, yaml
- Homepage: https://sini.la/homeassistantmalaysia
- Size: 23 MB
- Stars: 21
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml.old
- License: LICENSE
Awesome Lists containing this project
README
\

[](https://twitter.com/zubirjamal)
[](https://zubirco.de/)
[](https://zubirco.de/buymecoffee)Automation for Malaysia Adzan (Muslim call to prayer) based on the following sources:
- JAKIM Official (eSolat) - [Website](https://www.e-solat.gov.my).
- AzanPro - [Website](https://api.azanpro.com).
- Home Assistant Official Islamic Prayer Time - [Website](https://www.home-assistant.io/integrations/islamic_prayer_times).**Whats New in v4**
- Fully revamped eSolat sensors.
- Easy install with minimal configuration.
- Prayer time sensor will show in timestamp format. 12/24hours format are now in attributes.
- Automation are now created by default automatically. However, you may choose to create your own.
- Dynamic Media Player selector.
- Added support the official Home Assistant Islamic Prayer Time
- Volume Slider Control based on the selected speaker/media_players (feature added from [pull-request #2](https://github.com/zubir2k/HomeAssistantAdzan/pull/2))
- Version checker & updater (NOTE: The updater will only update essential files only).**The Default Automation will perform the following:**
- Play TTS (for Google) or Play audio TTS (for Alexa)
- Play Azan
- Send Persistent Notification (Azan & 15min Reminder)
- Send default Notification (notify.notify)## Screenshot




## Video Tutorial
[](https://youtu.be/SVzybCpjWGQ)
- Automation Adzan using Home Assistant: https://youtu.be/SVzybCpjWGQ
- Beginners Guide to Home Assistant: https://youtu.be/-jyegp-mL20## Installation
### 1. Copy all files
- Browse into your Home Assistant directory and paste all files into `\config` and `\media`.### 2. Add eSolat into [configuration.yaml](configuration.yaml)
- Add the following line into the config file```yaml
homeassistant:
packages: !include_dir_named HAMY/
```- Restart Home Assistant to take effect.
### 3. Dashboard [lovelace-ui.yaml](lovelace-ui.yaml)
- Add new card, scroll at the bottom and choose Manual.
- Copy & paste the YAML respectively.
## Configure eSolat
### 1. Source
- Select source (Jakim/AzanPro/Local/Islamic Prayer Time)
- Enter state code (not applicable for Islamic Prayer Time) -- Refer state code [here](https://www.e-solat.gov.my/index.php?siteId=24&pageId=50).
- For Islamic Prayer Time, please ensure to complete the configuration in the Home Assistant Integration menu### 2. Azan Audio & Automation
- Select your preferred media player
- Choose your automation (Google or Alexa). Select Custom if you wish to use your own automation.
- **For Google**, please enter `azan.mp3` and `azansubuh.mp3` as your audio files. You may use your own mp3 stored in your `\media` folder.
- **For Alexa**, please enter your `home_url`. **IMPORTANT**: Please ensure [Alexa_Media_Player](https://github.com/custom-components/alexa_media_player) addon has been configured.### 3. Refresh
- Click here
[](https://my.home-assistant.io/redirect/automations/) to open your automation panel.
- Run `Azan Yearly Update`> 
- Press both Online and Local sensors to take effect.
## Automation Ideas
There are many ways that you can benefit from the prayer time sensors.### 1. Execute action upon x minute **before** prayer time.
Example: 15min before Maghrib, play random surah. `15*60` where 15 is in minutes.```yaml
{{ state_attr('sensor.solat_maghrib', '24hours') == (now().strftime('%s') | int + 15*60) | timestamp_custom("%H:%M", false) }}
```### 2. Random play audio
Example: Random play Surah before/after azan.```yaml
- service: media_player.play_media
data:
media_content_type: audio/mp3
media_content_id: |
{{ ["media-source://media_source/local/audio/surah1.mp3",
"media-source://media_source/local/audio/surah2.mp3",
"media-source://media_source/local/audio/surah3.mp3",
"media-source://media_source/local/audio/surah4.mp3",
] | random }}
```### 3. Others
Send notification to any Android TVs and perhaps then shutting off the TV. \
Example: Alert family to get ready for Maghrib. Then turn off the TV 😁## Special Thanks
- [@farxpeace](https://github.com/farxpeace) - for the original integration code for AzanPro
- [HomeAssistantMalaysia](https://www.facebook.com/groups/homeassistantmalaysia)*You may also try [GPS Based](https://github.com/zubir2k/HomeAssistantEsolatGPS) Solat sensor using Appdaemon. (API provided by MPT)*
## ⚠ Disclaimer
THIS IS NOT AN INTEGRATION ADD-ON ([issue#3](https://github.com/zubir2k/HomeAssistantAdzan/issues/3)). THIS IS A TEMPLATE THAT CREATES SENSORS AND AUTOMATION FOR ADZAN PRAYER.