Adhan Automation (الأذان التلقائي للصلاة) using google speaker

What is wrong here, everything works now but i don’t get any notification. When i run the automation manually, it works well.

alias: OgleVakti
description: ""
trigger:
  - platform: time
    at: sensor.ogle
    id: Ogle
condition:
  - condition: trigger
    id:
      - Ogle
action:
  - data:
      message: Ogle Namazi
    action: notify.mobile_app_xxxxx
  - metadata: {}
    data:
      volume_level: 0.15
    target:
      entity_id: media_player.xxxxx
    action: media_player.volume_set
  - action: media_player.play_media
    metadata: {}
    data:
      media_content_id: http://xxxxxxxxxx:8123/local/xxx.mp3
      media_content_type: audio/mp3
    target:
      entity_id: media_player.xxxx
mode: single

Has anyone elses playback started failing after 2024.8.0?

2 Likes

I am not an expert but it looks like after action. you should issue a call of service and in this case it should be notify first and then data with message:

action:
  - service: notify.mobile_app_xxxxx
    data:
      message: Ogle Namazi
      title: 🕌 Prayer Time 🕌

This is assuming you only have issue getting notification on your mobile and the adhan plays fine on your speakers

Use this format for local files.

data:
media_content_id: /local/adhan/Adhan.mp3
media_content_type: audio/mp3
target:
entity_id: media_player.receiver
action: media_player.play_media

As Salaam Mu Aliakum

Hoping someone can guide me to get the Athaan automation to work

I used to use the Islamic Prayer time integration but the Athaan times are not correct for my country, i played with all the options in the integration and not successful without using delays etc

i decided to try the scrape integration and scrape the time from the following site

Masjid Muaadh bin Jabal - Crosby

image

I was able to successfully extract the time from the site (yay) but the issue I believe is the template used does not convert the string into a datestamp and does not trigger the Athaan automation.

my scrape settings

my automation

    alias: ASR Adthaan
    trigger:
      - trigger: time
        at:
          - sensor.asr_athaan
    action:
      - data:
          volume_level: 0.5
        action: media_player.volume_set
        target:
          entity_id: media_player.living_room_speaker
      - data:
          media_content_id: https://xxxxxxxxxx:8123/local/azan3.mp3
          media_content_type: music/mp3
        action: media_player.play_media
        target:
          entity_id: media_player.living_room_speaker
      - delay: "00:00:00"
    mode:
      single

above automation works when triggering manually but does not play the athaan at the indicated time

im using the following to convert the time into a valid format but it does not identity the device class as a timestamp, when selecting timestamp in the scrape integration settings the time shows as ‘none’

{{ today_at(value) | as_timestamp | timestamp_custom('%H:%M') }}

would appreciate any assistance, new to HA

Hi, how did you get the Hijri Date?
I cant seem to get it to work.
also, would it possible to share your YAML dashboard code?

Thanks,

It looks very nice, do you mind to share the codes and sensors. I want to built a page like yours if possible. Thank you

You can find it here:

Hi @chintito4ever -

I’m using Prayer Times Integration to get all my prayers and sensors.

All works well, and also the Dashboard is setup with times.

Would you be able to help/guide on how to get the Hijri Date\month integrated? Any leads or ideas on how to achieve this without the use of api (which was mentioned in other posts)

Idea is, if it’s Ramadan, then play Iftar/Suhoor duas

2 Likes