The website is the governing council for muslims in Singapore. Their calculations take precedence in these matters. The timings indicated in the website are fix-ed and calibrated according to various factors.
Looking at this technically, I am guessing that the websites have altered their page source resulting in my scrape sensors no longer being active.
(I have no programming/coding background and only recently started learning those because of HA)
Am I able to scrape the timings from either of these websites?
I have no clue what and how many websites exist so cannot asnwer this.
The ones I chose to feedback the differences are random , i.e. popping up via google. Also, governmental sites may not be correct at times
If the integration is âoffâ then I would report an issue there.
Sure, in this case, we can trust the timing provided on the websites mentioned on the first post.
I shall bring up an issue with the dev of that integration.
In the meantime, I would like to learn if I can scrape the timings off either of these websites. Would you be able to point a direction that I can follow?
I looked at your websites just now and they changed to :01 and also mine changed to :57 (from :56)
So⌠I am a bit confused now, should this not be stable per day?
It looks like this change is being caused by the website now using javascript to inject that data into the website. And apparently the Scrape integration cannot handle that.
However, following this post: Scrape HTTPS JavaScript generated content I found a solution for this.
The prayer times data is now delivered as JSON through a separate api link.
So if you create a RESTful Sensor that retrieves the prayer times from the api website, and a Template sensor to retrieve the JSON attribute it should be working again.
Something like this:
Great! You are welcome
About the coffee: no, thatâs OK. When I started with Home Assistant two years ago or so I also was helped several times via this community, so I am happy to be able to return this now when I can.
May be you can do the same sometimes when you have the time?
And I am still learning a lot as well while following the forums and looking into questions.
In this case I found the solution by reading this post from @Troon and this post from @ikea.
I managed to get the prayer times, but they are not triggering my automation. I suspect itâs because the time is in 12hr format and I canât figure how to change to 24hr.
I personally know nothing about Muslim praying times, so please explain: is there always one time shown per day per location on this muis website, and are those times give in 12-hour format?
If so, then why isnât the am / pm code given on that site?
How do you know whether it is in the morning or the evening?
Or is this indicated by those icons in front of the times?
Thank you for sharing. (logbook filters)
I have not come across it before.
In regards to the praying times, there is a 24 hour format provided by this website, an affiliate of MUIS.
However, I did not successfully manage to retrieve/scrape the timings from that website.
How do we know whether the 12 hour format praying times are for AM or PM:
I would say itâs because of the arrangement and the meaning of the prayers.
Subuh means dawn
Syuruk means sunrise
etc
Ah! I misunderstood and assumed these names to be city names with every city each own local time for a prayerâŚ
OK, so these names are the six prayers to be done each day at the given time, and these are all always either in the morning or in the afternoon?
If so, then this might be a solution:
I will be trying these out. I would love to learn more about this, do you have notes/documentation for the template you just created?
(just to correct you, itâs five prayer times)
âSyurukâ indicates to us humans that the time period to perform the subuh period at its appropriate time has ended.
I do have some documentation sources that I collected (see below), but I learned, and still do learn, the most from trying to understand code that is posted in this community by others.