Hello!
I’ve removed it, anyway, other error
2019-06-13 10:20:29 INFO (MainThread) [homeassistant.helpers.script] Script Echo Notify Test 2: Running script
2019-06-13 10:20:29 INFO (MainThread) [homeassistant.helpers.script] Script Echo Notify Test 2: Executing step call service
2019-06-13 10:20:29 INFO (MainThread) [homeassistant.helpers.script] Script Echo Notify Test: Running script
2019-06-13 10:20:29 INFO (MainThread) [homeassistant.helpers.script] Script Echo Notify Test: Executing step call service
2019-06-13 10:20:29 ERROR (MainThread) [homeassistant.components.script] Error executing script script.test_echo_notify_template. Unknown error for call_service at pos 1:
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/script/__init__.py", line 173, in async_turn_on
kwargs.get(ATTR_VARIABLES), context)
File "/usr/src/app/homeassistant/helpers/script.py", line 131, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 210, in _handle_action
action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 299, in _async_call_service
context=context
File "/usr/src/app/homeassistant/helpers/service.py", line 89, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File "/usr/src/app/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/components/notify/__init__.py", line 112, in async_notify_message
await notify_service.async_send_message(**kwargs)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/alexa_media/notify.py", line 137, in send_message
if data['type'] == "tts":
TypeError: 'NoneType' object is not subscriptable
2019-06-13 10:20:29 ERROR (MainThread) [homeassistant.components.script] Error executing script script.test_echo_notify. Unknown error for call_service at pos 1:
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/script/__init__.py", line 173, in async_turn_on
kwargs.get(ATTR_VARIABLES), context)
File "/usr/src/app/homeassistant/helpers/script.py", line 131, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 210, in _handle_action
action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 299, in _async_call_service
context=context
File "/usr/src/app/homeassistant/helpers/service.py", line 89, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File "/usr/src/app/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/components/script/__init__.py", line 114, in service_handler
context=service.context)
File "/usr/src/app/homeassistant/components/script/__init__.py", line 178, in async_turn_on
raise err
File "/usr/src/app/homeassistant/components/script/__init__.py", line 173, in async_turn_on
kwargs.get(ATTR_VARIABLES), context)
File "/usr/src/app/homeassistant/helpers/script.py", line 131, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 210, in _handle_action
action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 299, in _async_call_service
context=context
File "/usr/src/app/homeassistant/helpers/service.py", line 89, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File "/usr/src/app/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/components/notify/__init__.py", line 112, in async_notify_message
await notify_service.async_send_message(**kwargs)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/alexa_media/notify.py", line 137, in send_message
if data['type'] == "tts":
TypeError: 'NoneType' object is not subscriptable
2019-06-13 10:20:29 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall script.test_echo_notify (c:3647f237a5a54a2e92a0fe621704416e)>
Traceback (most recent call last):
File "/usr/src/app/homeassistant/core.py", line 1159, in _safe_execute
await self._execute_service(handler, service_call)
File "/usr/src/app/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/components/script/__init__.py", line 114, in service_handler
context=service.context)
File "/usr/src/app/homeassistant/components/script/__init__.py", line 178, in async_turn_on
raise err
File "/usr/src/app/homeassistant/components/script/__init__.py", line 173, in async_turn_on
kwargs.get(ATTR_VARIABLES), context)
File "/usr/src/app/homeassistant/helpers/script.py", line 131, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 210, in _handle_action
action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 299, in _async_call_service
context=context
File "/usr/src/app/homeassistant/helpers/service.py", line 89, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File "/usr/src/app/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/components/script/__init__.py", line 114, in service_handler
context=service.context)
File "/usr/src/app/homeassistant/components/script/__init__.py", line 178, in async_turn_on
raise err
File "/usr/src/app/homeassistant/components/script/__init__.py", line 173, in async_turn_on
kwargs.get(ATTR_VARIABLES), context)
File "/usr/src/app/homeassistant/helpers/script.py", line 131, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 210, in _handle_action
action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 299, in _async_call_service
context=context
File "/usr/src/app/homeassistant/helpers/service.py", line 89, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File "/usr/src/app/homeassistant/core.py", line 1150, in async_call
self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1172, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/components/notify/__init__.py", line 112, in async_notify_message
await notify_service.async_send_message(**kwargs)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/alexa_media/notify.py", line 137, in send_message
if data['type'] == "tts":
TypeError: 'NoneType' object is not subscriptable
Having this setup now:
test_echo_notify_template:
alias: Echo Notify Test
sequence:
- service: notify.alexa_media
data_template:
target: media_player.echoinputsoggiorno
# type: announce
message: >
Hello test from {{ alexa_message }}
test_echo_notify:
alias: Echo Notify Test 2
sequence:
- service: script.test_echo_notify_template
data:
alexa_message: A Script
Ideas?
Thanks a lot!
Simon