your browser or phone has the wrong browser time. try restarting it.
Thank you for letting me know that it doesnāt work!
Waāalaikum salam,
Maybe try re-booting your system to force-update the prayer times.
Also, Iāve noticed, you are looking at sensor: sensor.date_time
Did you change the code from the first post?
The original code in the first post used sensor.time_date
and not sensor.date_time
.
Assalaamuāalaikum
How does one display the actual prayer time for today in the front end, e.g. Fair at ā06:00ā instead of ā9 hours agoā?
Thank you, it started working once I installed an update to the OS. I had tried to restart a few times before posting but it didnāt seem to work then.
Thanks, it is working now after an OS update. I have both sensor.time_date and sensor.date_time configured.
This is possible so long as the prayer times provider has an API feed that you can access. Iāve done something similar and it works.
did you find a way to show it as exact time instead of hours ago/ hours left?
No, I have not yet been successful.
how did you get the farr and other prayers saying in 2 hours.
Through groups or you can use a lovelace entity card:
card:
entities:
- entity: sensor.islamic_prayer_time_fajr
- entity: sensor.islamic_prayer_time_sunrise
- entity: sensor.islamic_prayer_time_dhuhr
- entity: sensor.islamic_prayer_time_asr
- entity: sensor.islamic_prayer_time_maghrib
- entity: sensor.islamic_prayer_time_isha
show_header_toggle: false
type: entities
Hi, Iāve been trying to set this up for 2 weeks and I still not getting anywhere.
Iām a newbie to home assistant and yaml files. But I have done alot of work with computers and Android configuration files with ini files, HTML etcā¦
I have home assistant set-up on my synology via docker. I know the tutorial suggests to install hassio but on synology thereās no option to have hassio. From what Iāve read hassio is not required as it work as an operating system for raspberry pi.
I inject codes into my configuration and automation yaml files. I donāt get any errors after scrip config check.
I have # out any things I donāt think required as Iām only using 1 google home device and Iām not fussed with all the other option untill I canāt successfully get adhan working.
I have afew questions :
-where is local folder? Same as configuration.yaml?
āwhat ID do I use or where do I find the ID
-if using local folder for adhan audio, do I put a (s) after http or without an (s)?
In my home assistant page I can see the automations for adhan but I cant trigger it. When I select trigger, my google home make a ding noise but no adhan.
I tried using YouTube link and local folder hut still no joy.
Any assistance will be highly appreciated. I just want to successfully have adhan work for now then I will improve on it at a later stage.
Maybe if possible and not too much work maybe created a code for the bare basic to have adhan called via google home.
Hi, Could you please share your config file entry ? Also, do you see these sensors in the states section under Developer tools.
- Local folder in www folder. I had mine on /config/www/audio folder. Folder permission 755
Make sure you can reach it from http://yourhaip:8123/local/audio/youraudiofilename.mp3 - Which ID do you mean? you can find the list of IDs if you click on " <>" under Developer tools.
- You shouldnāt need the (s)
You can also call services in the services menu under Developer tools. I was having similar issues when I started using this. To trouble shoot the issue, I used a script to call the media player service.
Also, Itās very important to have your configuration.yaml setup up like porankaziās in the first post. Especially the sensors part.
Let us know how you make out.
Hi AdighaLogic, thanks for your reply and I appreciate your assistance
I do have these same sensors in the states section, under developer tool.
I have created a www folder in the same location where the yaml files are in (Iām assuming this is the local folder) and put the audio in that folder.
The media content id Iāve used is http://internalip:8123/local/www/azan2.mp3
The actual location in my Synology is /volume1/docker/Homeassistant/www/azan2.pm3 (yaml files are locted in /volume1/docker/Homeassistant)
I changed folder permission to 755 using the following code in putty via ssh (chmod -R 755 /volume1/docker/Homeassistant/www)
When I try to call the service under developer tools, I get an error āfailed to call service media_player/play media. required key not provided @data[āmedia_content_typeā]ā. I have tied the following media content type as: music and audio with upper and lower case
I have attached the following screenshot:
config yaml
auto yaml
services
call service
In the auto yaml, I have highlighted the ID which I was asking about
I didnāt know how to correctly attached the yaml files hence why I screenshot them.
I hope I have given all the information required
Hi!
youād still need to specify the media type in the service.
Try this in the Service Data (Json,optional) section of your service
{
āmedia_content_idā: āhttp://internalip:8123/local/azan2.mp3ā
āmedia_content_typeā: āmusicā
}
you could also try āaudio/mp3ā as media content type.
Thank you!
I have changed content ID in the auto yaml file to what you suggested and tried to call service but I get an error āInvalid JSONā
Iām sorry it was missing a comma after each parameter.
{āentity_idā:āmedia_player.living_room_speakerā,
āmedia_content_idā:āhttp://10.0.0.3:8123/local/azan2.mp3ā,
āmedia_content_typeā:āmucisā}
Please give it a try.
Thanks, I still get āinvalid JSONā
But Iām now able to trigger it via google home trigger page and plays the adhan.
Now to see if the automation works
Thanks heaps for your assistance. hopefully, I can work out the rest.
Glad to hear you were able to get the athan to play.
just a side note, i noticed you used (media_player.media_ play) instead of (media_player.play_media) and thatās why you were still getting the invalid JSON.
Let us know you make out.
S.A
Looks like HA is upgrading youtube_dl in the next update. We should be able to play links from youtube directly AGAIN