#sorry what do you mean
1 messages · Page 1 of 1 (latest)
Exactly what I said...
alexa:
Smart_home:
homeassistant:
latitude: my location
longitude: my location
unit_system: metric
time_zone: Europe/London
``` if that's actually your `configuration.yaml` then it's broken
- It's
smart_homenotSmart_home
homeassistant:should have no spaces before it
You can remove all of
homeassistant:
latitude: my location
longitude: my location
unit_system: metric
time_zone: Europe/London
``` and set it up in the UI instead
ok let me try
At some point you really should run ha core check and find out how many errors you have in your YAML
- HAOS
ha core check - Container uses
dockercommands - Core requires you to activate the venv first
is the automation fine
Well, if you run ha core check we'll find out
I suspect the second trigger isn't what you want though
- platform: device
type: changed_states
device_id: 8e4f2edc5e188a5d378f9aeb668711f3
entity_id: media_player.echo_show_tv_room
domain: media_player
``` is likely to be a bad idea
basically I am trying play the call to prayer via alexa at certain times using thst mp3 link, I dont know where to start from.
Have you at any point tested the action?
- service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan%20Alexa.mp3'/>
target:
- media.player.Echo_show_TV_room
data:
type: tts
That bit
I got this: Failed to call service notify alexa_media. expected dict for dictionary value @ data[data]. Got None
that's the correct name
i put this as service :Notifications: Send a notification with alexa_media
then
Open your Home Assistant instance and show your state developer tools
Try that in the action, see if the action works
- service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan%20Alexa.mp3'/>
target:
- media_player.echo_show_tv_room
data:
type: tts
I suspect you'll get other errors as you've said it's a TTS (text to speech) but you've picked an MP3
Same error
service: notify.alexa_media
data:
message: hello
target: media.media_player.ali_s_echo
even this doesnt work
- service: notify.alexa_media
data:
data:
type: tts
message: 'Ding-dong. Someone is at the door.'
target: media_player.echo_show_tv_room
What about that?
Lifted directly from their docs
same error 🤯
Please use a code share site to share code or logs, for example:
- http://pastie.org/ (select YAML for the language)
- https://dpaste.org/ (select YAML for the language)
- https://paste.debian.net/ (you guessed it, select YAML as the language)
Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.
service: notify.alexa_media
data:
message: hello
target: media_player.ali_s_echo
this works
And what if you instead pick media_player.echo_show_tv_room?
service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan Alexa.mp3'/>
target: media_player.ali_s_echo
the sound is working now

Well, I'm glad, even if the way you test things is to change one thing at a time
Playing chaos monkey doesn't help
even with this media_player.echo_show_tv_room
so we know the sound plays, how can i get it to work with the script
??
Put the working call in the automation, and see if the actions work
To test an automation there's three stages you can follow. Testing the action, the condition and action, and the whole automation:
- Use Configuration -> Automations to find the automation and then push Run Actions. If this fails your problem is in the
action:section, and details should be found in your log file - Use Developer tools -> Services and call
automation.triggeron the automation withskip_condition: false. If the first passes but this fails then the problem is in yourcondition:block - Use Developer tools -> States to find the trigger entity, click the name, then change the state (at the top) to something that'll trigger the automation before pushing Set State. If this fails then the problem is with your
trigger:section, or the automation is turned off (you can check that in Developer tools -> States).
You can also see this section in the docs and with HA 2021.4 onwards debug automations.
- id: "1673136008184"
alias: Call to prayer example
description: ""
trigger:- platform: time
at:- sensor.fajr_prayer
- sensor.dhuhr_prayer
- sensor.asr_prayer
- sensor.maghrib_prayer
- sensor.isha_prayer
- platform: device
type: changed_states
device_id: 8e4f2edc5e188a5d378f9aeb668711f3
entity_id: ali's Echo
domain: media_player
condition: []
action: - service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan Alexa.mp3'/>
target:
- media.player.Echo_show_TV_room
data:
type: tts
mode: single
- platform: time
sorry which part shall i change??
service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan Alexa.mp3'/>
target: media_player.ali_s_echo
this works
@grand citrus To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
If you're not going to post stuff to a code share site, at least use code markup so we can read it
And ... you change the action
- id: "1673136008184"
alias: Call to prayer example
description: ""
trigger:- platform: time
at:- sensor.fajr_prayer
- sensor.dhuhr_prayer
- sensor.asr_prayer
- sensor.maghrib_prayer
- sensor.isha_prayer
- platform: device
type: changed_states
device_id: 8e4f2edc5e188a5d378f9aeb668711f3
entity_id: ali's Echo
domain: media_player
condition: []
action: - service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan Alexa.mp3'/>
target:
- media.player.Echo_show_TV_room
data:
type: tts
mode: single
- platform: time
is that readable?
code: - id: "1673136008184"
alias: Call to prayer example
description: ""
trigger:
- platform: time
at:
- sensor.fajr_prayer
- sensor.dhuhr_prayer
- sensor.asr_prayer
- sensor.maghrib_prayer
- sensor.isha_prayer
- platform: device
type: changed_states
device_id: 8e4f2edc5e188a5d378f9aeb668711f3
entity_id: ali's Echo
domain: media_player
condition: []
action:
- service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan%20Alexa.mp3'/>
target:
- media.player.Echo_show_TV_room
data:
type: tts
mode: single
- service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan%20Alexa.mp3'/>
target:
- media.player.Echo_show_TV_room
data:
type: tts
``` that's what you need to replace
- service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan%20Alexa.mp3%27/%3E
target: media_player.ali_s_echo
code: - id: "1673136008184"
alias: Call to prayer example
description: ""
trigger:
- platform: time
at:
- sensor.fajr_prayer
- sensor.dhuhr_prayer
- sensor.asr_prayer
- sensor.maghrib_prayer
- sensor.isha_prayer
- platform: device
type: changed_states
device_id: 8e4f2edc5e188a5d378f9aeb668711f3
entity_id: ali's Echo
domain: media_player
condition: []
action:
- service: notify.alexa_media
data:
message: <audio src='https://dl.sndup.net/zyjs/Azan%20Alexa.mp3%27/%3E
target: media_player.ali_s_echo
mode: single
done
Now test it
im lost i cant test it
Sure you can
