#sorry what do you mean

1 messages · Page 1 of 1 (latest)

tall cove
#

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
#
  1. It's smart_home not Smart_home
#
  1. 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
grand citrus
#

ok let me try

tall cove
#

At some point you really should run ha core check and find out how many errors you have in your YAML

main pagodaBOT
grand citrus
#

is the automation fine

tall cove
#

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
grand citrus
#

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.

tall cove
#

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

grand citrus
#

I got this: Failed to call service notify alexa_media. expected dict for dictionary value @ data[data]. Got None

tall cove
#

Now we're getting somewhere

#

I'd first correct the invalid target entity

grand citrus
#

that's the correct name

#

i put this as service :Notifications: Send a notification with alexa_media

tall cove
#
media.player.Echo_show_TV_room
#

Nope, nope, nope, nope, nope

grand citrus
#

then

main pagodaBOT
tall cove
#

Go look there, find the actual entity

#

Don't retype it, copy and paste

grand citrus
#

ok

#

Echo show TV room

#

that

tall cove
#

No, the entity_id

#

media_player.whale

grand citrus
#

oh ok

#

media_player.echo_show_tv_room

tall cove
#

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

grand citrus
#

Same error

tall cove
#

Which is probably because you're playing a TTS with an MP3

grand citrus
#

service: notify.alexa_media
data:
message: hello
target: media.media_player.ali_s_echo

#

even this doesnt work

tall cove
#
  - 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

grand citrus
#

same error 🤯

main pagodaBOT
#

Please use a code share site to share code or logs, for example:

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.

grand citrus
#

service: notify.alexa_media
data:
message: hello
target: media_player.ali_s_echo

#

this works

tall cove
#

And what if you instead pick media_player.echo_show_tv_room?

grand citrus
#

the sound is working now

tall cove
#

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

grand citrus
#

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

#

??

tall cove
#

Put the working call in the automation, and see if the actions work

main pagodaBOT
#

To test an automation there's three stages you can follow. Testing the action, the condition and action, and the whole automation:

  1. 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
  2. Use Developer tools -> Services and call automation.trigger on the automation with skip_condition: false. If the first passes but this fails then the problem is in your condition: block
  3. 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.

grand citrus
#
  • 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
#

sorry which part shall i change??

#

this works

main pagodaBOT
#

@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.

tall cove
#

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

grand citrus
#
  • 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
#

is that readable?

tall cove
#

```yaml
code: here
```

#
code: here
grand citrus
#
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
tall cove
#
    - 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
grand citrus
#
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

tall cove
#

Now test it

grand citrus
#

sorry im new to HA

#

how to i test it

tall cove
grand citrus
#

im lost i cant test it

tall cove
#

Sure you can