zubir2k / HomeAssistantAdzan

🕋 Automation for Malaysia Adzan (Muslim call to prayer) based on JAKIM API. Give support by pressing the ⭐ button. Jazakallahu khair
https://sini.la/homeassistantmalaysia
The Unlicense
25 stars 8 forks source link
automation azan home-assistant home-assistant-config home-automation homeassistant integration jakim malaysia prayer-times template yaml

Home Assistant Adzan\ GitHub Repo stars Twitter Follow Repo Donate

Automation for Malaysia Adzan (Muslim call to prayer) based on the following sources:

Whats New in v4

The Default Automation will perform the following:

Screenshot

image

image

image

lovelace-dashboard

image

Video Tutorial

Youtube

Installation

1. Copy all files

2. Add eSolat into configuration.yaml

homeassistant:
  packages: !include_dir_named HAMY/

3. Dashboard lovelace-ui.yaml

image

Configure eSolat

1. Source

2. Azan Audio & Automation

3. Refresh

image

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.

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

  - 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

You may also try GPS Based Solat sensor using Appdaemon. (API provided by MPT)

⚠ Disclaimer

THIS IS NOT AN INTEGRATION ADD-ON (issue#3). THIS IS A TEMPLATE THAT CREATES SENSORS AND AUTOMATION FOR ADZAN PRAYER.