Himdola
August 13, 2024, 9:20am
581
What is wrong here, everything works now but i don’t get any notification. When i run the automation manually, it works well.
alias: OgleVakti
description: ""
trigger:
- platform: time
at: sensor.ogle
id: Ogle
condition:
- condition: trigger
id:
- Ogle
action:
- data:
message: Ogle Namazi
action: notify.mobile_app_xxxxx
- metadata: {}
data:
volume_level: 0.15
target:
entity_id: media_player.xxxxx
action: media_player.volume_set
- action: media_player.play_media
metadata: {}
data:
media_content_id: http://xxxxxxxxxx:8123/local/xxx.mp3
media_content_type: audio/mp3
target:
entity_id: media_player.xxxx
mode: single
Has anyone elses playback started failing after 2024.8.0?
opened 10:17AM - 13 Aug 24 UTC
integration: media_player
### The problem
After 2024.8.0 (and also now on 2024.8.1), media_player no lo… nger plays a locally hosted file (either through url or locally stored media:
`# Automations
automation:
# Adhan
- alias: Adhan
trigger:
- platform: state
entity_id: sensor.salah_actual
to:
- Fajr
- Dhuhr
- Asr
- Maghrib
- Isha
action:
- action: notify.ios_all
data:
message: "It is {{ states.sensor.salah_actual.state }} time, please perform wudhu."
- action: media_player.media_pause
target:
entity_id:
- media_player.android
- media_player.shield
- action: switch.turn_on
target:
entity_id: switch.pc_mute
- action: media_player.volume_set
target:
entity_id: media_player.living_room_speaker
data:
volume_level: 0.6
- action: media_player.play_media
data:
media_content_id: "http://10.10.1.200:8123/local/adhan-{{'fajr' if trigger.to_state.state == 'Fajr' else 'main'}}.mp3"
media_content_type: music
target:
entity_id:
- media_player.living_room_speaker
- media_player.bedroom`
### What version of Home Assistant Core has the issue?
2024.8.1
### What was the last working version of Home Assistant Core?
2024.7.x
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Automation
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/media_player/
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
# Automations
automation:
# Adhan
- alias: Adhan
trigger:
- platform: state
entity_id: sensor.salah_actual
to:
- Fajr
- Dhuhr
- Asr
- Maghrib
- Isha
action:
- action: notify.ios_all
data:
message: "It is {{ states.sensor.salah_actual.state }} time, please perform wudhu."
- action: media_player.media_pause
target:
entity_id:
- media_player.android
- media_player.shield
- action: switch.turn_on
target:
entity_id: switch.pc_mute
- action: media_player.volume_set
target:
entity_id: media_player.living_room_speaker
data:
volume_level: 0.6
- action: media_player.play_media
data:
media_content_id: "http://10.10.1.200:8123/local/adhan-{{'fajr' if trigger.to_state.state == 'Fajr' else 'main'}}.mp3"
media_content_type: music
target:
entity_id:
- media_player.living_room_speaker
- media_player.bedroom
```
### Anything in the logs that might be useful for us?
_No response_
### Additional information
I've also tried using the following:
`media_content_id: "media-source://media_source/local/adhan-{{'fajr' if trigger.to_state.state == 'Fajr' else 'main'}}.mp3"`
2 Likes
raub21
(Raub21)
August 15, 2024, 12:08pm
583
I am not an expert but it looks like after action. you should issue a call of service and in this case it should be notify first and then data with message:
action:
- service: notify.mobile_app_xxxxx
data:
message: Ogle Namazi
title: 🕌 Prayer Time 🕌
This is assuming you only have issue getting notification on your mobile and the adhan plays fine on your speakers
banstro
(AB)
November 15, 2024, 7:02pm
584
Use this format for local files.
data:
media_content_id: /local/adhan/Adhan.mp3
media_content_type: audio/mp3
target:
entity_id: media_player.receiver
action: media_player.play_media
raph-za
(Raph)
December 27, 2024, 9:00pm
585
As Salaam Mu Aliakum
Hoping someone can guide me to get the Athaan automation to work
I used to use the Islamic Prayer time integration but the Athaan times are not correct for my country, i played with all the options in the integration and not successful without using delays etc
i decided to try the scrape integration and scrape the time from the following site
Masjid Muaadh bin Jabal - Crosby
I was able to successfully extract the time from the site (yay) but the issue I believe is the template used does not convert the string into a datestamp and does not trigger the Athaan automation.
my scrape settings
my automation
alias: ASR Adthaan
trigger:
- trigger: time
at:
- sensor.asr_athaan
action:
- data:
volume_level: 0.5
action: media_player.volume_set
target:
entity_id: media_player.living_room_speaker
- data:
media_content_id: https://xxxxxxxxxx:8123/local/azan3.mp3
media_content_type: music/mp3
action: media_player.play_media
target:
entity_id: media_player.living_room_speaker
- delay: "00:00:00"
mode:
single
above automation works when triggering manually but does not play the athaan at the indicated time
im using the following to convert the time into a valid format but it does not identity the device class as a timestamp, when selecting timestamp in the scrape integration settings the time shows as ‘none’
{{ today_at(value) | as_timestamp | timestamp_custom('%H:%M') }}
would appreciate any assistance, new to HA
hsiddiq
(Hamza)
March 9, 2025, 4:53am
586
Hi, how did you get the Hijri Date?
I cant seem to get it to work.
also, would it possible to share your YAML dashboard code?
Thanks,
It looks very nice, do you mind to share the codes and sensors. I want to built a page like yours if possible. Thank you
hsiddiq
(Hamza)
March 11, 2025, 12:06pm
589
Hi @chintito4ever -
I’m using Prayer Times Integration to get all my prayers and sensors.
All works well, and also the Dashboard is setup with times.
Would you be able to help/guide on how to get the Hijri Date\month integrated? Any leads or ideas on how to achieve this without the use of api (which was mentioned in other posts)
Idea is, if it’s Ramadan, then play Iftar/Suhoor duas
2 Likes