It’s been a while since I’ve interacted on this platform, I hope everyone is doing well.
I saw Astr binding, and I think it can be used for Islamic Azan Time. If you know we have 5 times azan in a day and the times changed based on the time sun and moon. I dont know wxactly how, so I am asking if somebody has a chance to do that and if can share his experience?
It uses a third party Python library instead of Astro though. I know of no attempt to use Astro for this.
If the Atro binding provides the information you need though I see no reason why it can’t be used instead.
An overall approach would be as follows:
trigger the rule every minute or every few seconds (you need this so that the rule continues to run over night where both the sun and moon are down (elevation/angle is 0). How often you trigger depends on how precise you want the rule to run. Every second might be too much though.
in the rule gather the information you need from the Astro binding (Items of through the Astro Actions) and add the logic necessary to determine which Azan time you are in
update an Item when the Azan time changes with the new period name
anything that needs to react to the start of an Azan time should trigger on changes the the Azan time
Another approach could be:
a little after midnight (Astro calculates the new days solar and lunar events ten seconds after midnight) and on OH startup trigger a rule that calcualtes the Azan times for the new day
Another approach could be the same as the previous one only instead of the rule template, create one rule per Azan that uses the DateTime Items with the Azan times to trigger rules using a Time is <Item>.