Automate Islamic Adhan (also called Azan or Azzan) or other prayer calls - Updated 3_24_2023 for Node-RED

I have also your same problem manual triggering working automatically not working .

Can you please explain or send the code how it is solved.
I tried many times but not work

Shamseer,

have you tried connecting with LAN connection.

Regards,
Bilal

Hello
Mr Bilal
Now it is working perfect .I found the issue .I have write wrong sensor name in Automation.yaml .
And I need one other help .
Azar prayer time showing 30 minutes up .actual time 19:08 but sensor detect 20:08
Calculation method used .Makha .
Country . Qatar
How can I correct this time .

Hello
Mr Bilal
Now it is working perfect .I found the issue .I have write wrong sensor name in Automation.yaml .
And I need one other help .
Azar prayer time showing 30 minutes up .actual time 19:08 but sensor detect 20:08
Calculation method used .Makha .
Country . Qatar
How can I correct this time .

Hi,

You can add or subtract time in template format, +600 is added in below example mean to trigger Azzan after 10 min (600 sec), for reduction you can use -600.

platform: template
value_template: ā€˜{{ as_timestamp(strptime(states(ā€œsensor.time_dateā€), ā€œ%H:%M, %Y-%m-%dā€)) == as_timestamp(strptime(states(ā€œsensor.asr_prayerā€), ā€œ%Y-%m-%dT%H:%M:%Sā€))+600 }}ā€™

Hope this helpsā€¦

Assalamu alikum
I am using prayer time HA Dashboard .but showing (8hours ago -11minutes ago) same like .instead of this I need HH:MM .can you help me how to fix .

This is my current dash bord .I need same like your dashboard exact time .
I am attaching entities current using code also

Walikumsalam Shamseer.
Hereā€™s what my one looks like.

1 Like

Hello Mr Lee Harris

I have solved with your instruction
Thanks for your support

Has 0.109.6 broken their times? Mine seems to have broken after an update:

Screen Shot 2020-05-08 at 22.19.28

Currently attempting a rollback to 0.109.5 but was definitely working on 0.109.4. It looks like something has changed on 0.109.6:

edit: rolling back to 0.109.5 has fixed this.

update: https://github.com/home-assistant/home-assistant.io/issues/13361

Assalamu alikum

I have Done That issue .i add -1800 for 30 minutes . its working well but still now showing on HA Dashboard wrongly . Do you have any idea how to fix this

The Actual time 07 : 38 PM

Waalaikumsalam,

sorry for the late reply, wasnā€™t checking in here for several days. Glad i saw that you have solved the issue.

Just sharing, Iā€™m just a noob with Node-RED and HA, for those who wish to use Node-RED in HA:

Basically the important part is this:
Screenshot 2020-05-09 at 6.04.37 AM

First node is ā€œevents: allā€ you could also use the ā€œinjectā€ node and set it to ā€œrepeatā€ on ā€œintervalā€ every second to check the Adhan time with current time.

Second node:
Screenshot 2020-05-09 at 6.08.22 AM

Basically, itā€™s the ā€œget templateā€ node and in the template you enter as follows:

{{as_timestamp(states("sensor.date_time_iso")) == as_timestamp(states("sensor.fajr_prayer"))-600}}

UPDATE: For Home Assistant 0.109.6, use this (credit to engrbm87):

{{ as_timestamp(states("sensor.date_time_iso")) == as_timestamp(as_timestamp(states.sensor.fajr_prayer.state) | timestamp_local) - 600}}


I set minus 600 seconds because the time is wrong which is late 8min, i added another 2 min because i use this to turn on the local radio on my Xiaomi Gateway two minutes before actual Adhan.

Next is the ā€œswitchā€ node, this checks for the output of the get template:
Screenshot 2020-05-09 at 6.12.26 AM

Just set the ā€œmsg.payload == Trueā€

Next I use a ā€œdelay nodeā€, you could use the ā€œtrigger : stateā€ node instead, i use the delay node because it will send a bunch of msg during that 1 min that the template result is true. The Xiaomi Gateway FM Radio i use is a little buggy, sometimes throwing API error, so i made sure that the command is sent several times to turn on the radio.
Screenshot 2020-05-09 at 6.32.59 AM

Screenshot 2020-05-09 at 6.21.38 AM

I also created something similar to reboot the VM using hassio host_reboot to reboot the machine 10 min before the Adhan automation runs so i can ensure that HA detects my Xiaomi Gateway FM Radio.


Assalamu alikum

Actualy i did not get any idea . I am first in home assistant .can you please tell me where i can get this node editing Area in HA

Waalaikumsalam,

You donā€™t have to use the Node-RED method, this is only is you wish to use Node-RED for more control.

Iā€™m using Xiaomi Gateway to turn on the internet FM Radio, because i cannot stream mp3 to the gateway and since the local radio plays Adhan when itā€™s time i switch it on. Especially during this COVID-19 period, sometimes the Mufti has some message for the Ummah just after the Adhan.

Since HA does not support the FM radio functionality for the Gateway, using 3rd party integration can be buggy sometimes, so i use Node-Red to detect if the entity is available before Adhan and if it is not available, it restart HA first, if still undetected after HA restart it will reboot the host machine. That normally fixes my issue with the FM radio.

Assalamu Alikum

Can you please tell me how you created this prayer time Card
If you have codes can you please share me with instruction . Because i am in 1st time in home assistant

Waalaikumsalam shamseer,

I saw that you have already posted the card in your previous post.

If you want to offset the time for Isha prayer, i donā€™t have any idea myself on how to do that, maybe someone more experience with Python codes can helpā€¦

Thanks for your help and Instruction ā€¦
You know how to create below same like Dashbord in HA

prayerdash

For styling the UI, you have to look thru those post with title ā€œLovelaceā€.

Iā€™m new with HA too, just a few weeks, so havenā€™t really tried playing around with the UI

Something like this post: