Hi all,
I am running hassio and this is my configuration.yaml entry for Amazon’s Polly service:
# Configure Amazon Polly
tts:
- platform: amazon_polly
aws_access_key_id: my key
aws_secret_access_key: 'my key'
region_name: 'us-east-1'
voice: Joanna
I don’t get any errors loading that component.
I get the following error when trying to send a message.
Error executing service <ServiceCall media_player.play_media: media_content_id=http://192.168.1.7:8123/api/tts_proxy/a506d9c4f9af3a8b8cf232d737dd9bc8449ce4d3_en-us_2695048230_amazon_polly.mp3, media_content_type=music>
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 1010, in _event_to_service_call
yield from service_handler.func(service_call)
File "/usr/lib/python3.6/site-packages/homeassistant/components/media_player/__init__.py", line 403, in async_service_handler
yield from getattr(player, method['method'])(**params)
File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
future.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/media_player/__init__.py", line 694, in play_media
raise NotImplementedError()
NotImplementedError
So it seems it cannot execute the service call play media to one of my home media players.
This is the script I am using to test. I have 2 media players recognized by HA, a Roku and a Samsung wireless sound bar.
I tried adding “entity_id: media_player.samsung_wireless_audio_hwk650” into the script and I get the same error. If I don’t include an “entity id:” the docs said it would broadcast over all my media players.
Here is my test script in my automations.yaml file:
# Test Amazon Polly
- id: test_amazon_polly
alias: Test Amazon Polly
initial_state: True
trigger:
platform: template
value_template: "{% if is_state('sensor.where_is_brandon', 'Home') %}true{% endif %}"
action:
- service: tts.amazon_polly_say
data_template:
entity_id: media_player.samsung_wireless_audio_hwk650
message: >
<speak>
Hello from Amazon Polly
</speak>
I’m home of course when I run the test the script and that is when my log shows the Error executing service <ServiceCall media_player.play_media: error...
appears.
Any help would be greatly appreciated and thanks!