Automation for Malaysia Adzan (Muslim call to prayer) based on the following sources:
- JAKIM Official (eSolat) - Website.
- AzanPro - Website.
- Home Assistant Official Islamic Prayer Time - Website.
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)
- 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)
- Automation Adzan using Home Assistant: https://youtu.be/SVzybCpjWGQ
- Beginners Guide to Home Assistant: https://youtu.be/-jyegp-mL20
- Browse into your Home Assistant directory and paste all files into
\config
and\media
.
2. Add eSolat into configuration.yaml
- Add the following line into the config file
homeassistant:
packages: !include_dir_named HAMY/
- Restart Home Assistant to take effect.
3. Dashboard lovelace-ui.yaml
- Add new card, scroll at the bottom and choose Manual.
- Copy & paste the YAML respectively.
- Select source (Jakim/AzanPro/Local/Islamic Prayer Time)
- Enter state code (not applicable for Islamic Prayer Time) -- Refer state code here.
- For Islamic Prayer Time, please ensure to complete the configuration in the Home Assistant Integration menu
- 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
andazansubuh.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 addon has been configured.
- Press both Online and Local sensors to take effect.
There are many ways that you can benefit from the prayer time sensors.
Example: 15min before Maghrib, play random surah. 15*60
where 15 is in minutes.
{{ state_attr('sensor.solat_maghrib', '24hours') == (now().strftime('%s') | int + 15*60) | timestamp_custom("%H:%M", false) }}
Example: Random play Surah before/after azan.
- 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 }}
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 π
- @farxpeace - for the original integration code for AzanPro
- HomeAssistantMalaysia
You may also try GPS Based Solat sensor using Appdaemon. (API provided by MPT)
THIS IS NOT AN INTEGRATION ADD-ON (issue#3). THIS IS A TEMPLATE THAT CREATES SENSORS AND AUTOMATION FOR ADZAN PRAYER.