Adhan automation (أذان التلقائي) using Home Assistant and Google Home Mini

Salam aalikom @snaqvi. You have all configuration. You can add now the Islamic prayer time integration from Home assistant. Go to settings<devices and services<add integration and search for islamic prayers time. or you can add it through this link. I have an automation for the adthan for alexa devices. If you need my code, I will be happy to share it here.

When my Home assistant is updated i dont get to see the times on the Glance Card it says Unknown. Where can i look to solve the problem?

Same issue over here. I am scraping the times of a website but see it also as ‘‘unknown’’ instead of the time. This is my config:

Date & Time

  • platform: time_date
    display_options:
    • ‘time’
  • platform: scrape
    resource: Diyanet İşleri Başkanlığı | Papendrecht İçin Namaz Vakti
    select: “#today-pray-times-row > div:nth-child(1) > div > div.tpt-time”
    name: İmsak
  • platform: scrape
    resource: Diyanet İşleri Başkanlığı | Papendrecht İçin Namaz Vakti
    name: Güneş
    select: “#today-pray-times-row > div:nth-child(2) > div > div.tpt-time”
  • platform: scrape
    resource: Diyanet İşleri Başkanlığı | Papendrecht İçin Namaz Vakti
    name: Öğle
    select: “#today-pray-times-row > div:nth-child(3) > div > div.tpt-time”
  • platform: scrape
    resource: Diyanet İşleri Başkanlığı | Papendrecht İçin Namaz Vakti
    name: İkindi
    select: “#today-pray-times-row > div:nth-child(4) > div > div.tpt-time”
  • platform: scrape
    resource: Diyanet İşleri Başkanlığı | Papendrecht İçin Namaz Vakti
    name: Akşam
    select: “#today-pray-times-row > div:nth-child(5) > div > div.tpt-time”
  • platform: scrape
    resource: Diyanet İşleri Başkanlığı | Papendrecht İçin Namaz Vakti
    name: Yatsı
    select: “#today-pray-times-row > div:nth-child(6) > div > div.tpt-time”
  • platform: template
    sensors:
    imsak_vakti:
    friendly_name: “İmsak Vakti”
    value_template: “{{ states(‘sensor.aksam’) == states(‘sensor.time’) }}”
  • platform: template
    sensors:
    gunes_vakti:
    friendly_name: “Güneş Vakti”
    value_template: “{{ states(‘sensor.gunes’) == states(‘sensor.time’) }}”
  • platform: template
    sensors:
    ogle_namazi:
    friendly_name: “Öğle Vakti”
    value_template: “{{ states(‘sensor.ogle’) == states(‘sensor.time’) }}”
  • platform: template
    sensors:
    ikindi_namazi:
    friendly_name: “İkindi Vakti”
    value_template: “{{ states(‘sensor.ikindi’) == states(‘sensor.time’) }}”
  • platform: template
    sensors:
    aksam_namazi:
    friendly_name: “Akşam Vakti”
    value_template: “{{ states(‘sensor.aksam’) == states(‘sensor.time’) }}”
  • platform: template
    sensors:
    yatsi_namazi:
    friendly_name: “Yatsı Vakti”
    value_template: “{{ states(‘sensor.yatsi’) == states(‘sensor.time’) }}”

I am not familiar with the time settings you have. Mine works just fine . I am using the new setup though. . I added the islamic prayers time integration and then configure according the time I want. Then made my automation .You may want to add the islamic prayers time integration by adding it from the settings and add integration. You can read more about here

High can someone point out how Diyanet can be implemented ?? I did webscrap but did work for while… it states unknown now…

MAY Allah blesses you all

Salam Alikom. what’s the new setup everyone is talking about?

Waalikom assalam. I just configured the adthan using Home assistant. I added the islamic prayers times integration from the settings. Then I created the automation to call adthan on my alexa devices. No need to add anything in the configuration file like adding your latitude or longitude…

I am not familiar with Diyanet nor the webscrap but if you need to configure the athan through HA, you can add the islamic prayers time integration from the home assistant settings. There is also a blueprint of the automation if you would like to add it to alexa.

Thanks i solve the problem about webscrape. I also look in to azhan app. But couldn’t find diyanet calculation…

After adding the islamic prayers times, you should see it in your integration:
Capture
After that if you click on configure, you should see a pop window like the following
2
You will be to configure the adthan times according to they calculation system you like.

I think diyanet blocket request unfortunately, i have developed an home-assistant addon times ago, but it needs some improvements… i will post here if the addon is in some stable state…

the automation approach is the same, only how to get the data should changed… it make sense to read weekly or monthly prayer times once… then this data is available for a long time locally and no unnecessary request made to the diyanet site

Thank you we are waiting for this addon and hope hear from you soon. thank you…

Hi,

here is my addon Prayer Times Addon.

Add to your repository by clicking on the below button.

Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.

1 Like

Thanks i have added the addon now. But have problem with adding and seeing the times on lovelace. When i now search such as Imsak Vakti, i see it as false. Should be fine to see it there the prayer time.

these template sensors are intended for the automations, so that azan is played.
to show the times you could try this

from this:

- platform: template
  sensors:
    diyanet_imsak_vakti:
      friendly_name: "İmsak Vakti"
      #value_template: "{{ states('sensor.imsak') == states('sensor.time') }}"
      value_template: "{{state_attr('sensor.namaz_vakti', 'fajr') == states('sensor.time')}}"

just remove the equals check
to this:

- platform: template
  sensors:
    diyanet_imsak_vakti:
      friendly_name: "İmsak Vakti"
      value_template: "{{state_attr('sensor.namaz_vakti', 'fajr')}}"

Works great now, very very thanks my brother.

I need now to get a notification to my phone instead to the TV. Do i need to add old template also on the sensors?

yes you need to add the other templates… and denn check in an automation if the state changes to true… just check the automation example… and replace in actions the services with the notification service

you should change the sensor name not only the friendly name…

like this:

- platform: template
    sensors:
      diyanet_imsak_vakti:
        friendly_name: "İmsak Vakti"
        value_template: "{{state_attr('sensor.namaz_vakti', 'fajr')}}"

- platform: template
    sensors:
      fajr_notify: # or whatever sensor name you want
        friendly_name: "İmsak Vakti Notify"
        value_template: "{{state_attr('sensor.namaz_vakti', 'fajr') == states('sensor.time')}}"

Thank you brother…much appreciated.

1 Like