Please have a look the op, I have updated it thanks
I guess there is some problem with this url. Are you sure that you are able to access azan1.mp3 at this url?
The url works fine, I’ve just blanked it out for privacy reasons.
Please use this automation file.
# Automation for 5 times Azan
- action:
- alias: 'Azan'
data:
entity_id: media_player.speaker_1
media_content_id: https://www.islamcan.com/audio/adhan/azan2.mp3
media_content_type: audio/mp3
service: media_extractor.play_media
- data:
entity_id: media_player.speaker_1
volume_level: '0.9'
service: media_player.volume_set
alias: Adhan
trigger:
- platform: template
value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.fajr_prayer"), "%Y-%m-%dT%H:%M:%S")) }}'
- platform: template
value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.dhuhr_prayer"), "%Y-%m-%dT%H:%M:%S")) }}'
- 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")) }}'
- platform: template
value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.maghrib_prayer"), "%Y-%m-%dT%H:%M:%S")) }}'
- platform: template
value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M, %Y-%m-%d")) == as_timestamp(strptime(states("sensor.isha_prayer"), "%Y-%m-%dT%H:%M:%S")) }}'
Hi @msahar any suggestion or idea please as why the timings displayed are UK GMT? I provided details above. Thank you.
Thanks, I have used the code you have attached, with some adjustments as there was some formatting errors, however I get the same issue. Nothing is being executed.
Also, what is the differences between this, and the method here?
Salaams Brother-
I am using a sonos wifi speaker- instead of a google speaker-
I have set up google assistant- followed all instructions-
I can’t see the Hassio.io - but used editor add on instead.
Everything has worked - but cannot trigger adhaan.
please help
Please share your configuration.yaml and automation.yaml files.
I age done exactly as you stated.
I feel the only problem is that I don’t own a google speaker, I have so is speakers.
I have been able to connect my li to home assistant and able to send a message to Sonos through HA, cannot run code - please help …
Have followed all instructions- except that I don’t have a google mini, instead using google assistant with sonos wifi speaker… please help
I can’t seem to see how I can send you a private message, if you could kindly message me privately so I can respond and send more images.
Thank you for you help brother, sorry to be trouble
Had the same issue this is what you need to use for SONOS
- alias: ‘Azan’
data:
entity_id: media_player.family_room
media_content_id: https://www.islamcan.com/audio/adhan/azan1.mp3
media_content_type: music
service: media_extractor.play_media - data:
entity_id: media_player.family_room
volume_level: ‘0.3’
service: media_player.volume_set
alias: Adhan
First calendar is not from HA. IS from an mobile app. Did you ask for that?
How did you set on the lovelace the exact prayer time instead of ago?
Look to the screenshot below, I need to see the scheduled prayer time.
Salaams,
Thank you so much for all your help around this. I ended up purchasing a google nest, and managed to get the adhaan working on there. However i would still like playback on the Sonos speakers, any help would be much appreciated. At the moment my yaml coding is exactly how you have shown in the main.
Hi @Himdola You have to add a “format time” line
see the example below:
entities:
- entity: sensor.fajr_prayer
format: time
- entity: sensor.dhuhr_prayer
format: time
- entity: sensor.asr_prayer
format: time
- entity: sensor.maghrib_prayer
format: time
- entity: sensor.isha_prayer
format: time
السلام عليكم
Where do I go to edit configuration .yaml file and replace all sensor
could provide a step by step for beginners like me
Thank you so much in advance!
Please first install “File Editor” from addons.
I have it installed!