Hello,
Script working but why showing error in log?
pilot_onkyo_wylacz:
alias: onkyo turn off
sequence:
#onkyo_off
- service: remote.send_command
entity_id: remote.harmony_hub
data:
command: PowerOff
device: 55327612
#bluesound_pause
- service: media_player.media_pause
data_template:
entity_id: >
{% if is_state("media_player.salon_bluesound", "playing") %}
media_player.salon_bluesound
{% else %}
{% endif %}
error in log
Log Details (ERROR)
Mon Feb 11 2019 18:06:51 GMT+0100 (czas środkowoeuropejski standardowy)
Error executing service <ServiceCall script.pilot_onkyo_wylacz (c:d26ca04c9dd84b0d8daafe29dfe3ed51)>
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1139, in _safe_execute
await self._execute_service(handler, service_call)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1152, in _execute_service
await handler.func(service_call)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/script.py”, line 123, in service_handler
context=service.context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/script.py”, line 181, in async_turn_on
kwargs.get(ATTR_VARIABLES), context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/script.py”, line 131, in async_run
await self._handle_action(action, variables, context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/script.py”, line 210, in _handle_action
action, variables, context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/script.py”, line 299, in _async_call_service
context=context
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/service.py”, line 85, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1110, in async_call
processed_data = handler.schema(service_data)
File “/srv/homeassistant/lib/python3.5/site-packages/voluptuous/schema_builder.py”, line 267, in call
return self._compiled([], data)
File “/srv/homeassistant/lib/python3.5/site-packages/voluptuous/schema_builder.py”, line 589, in validate_dict
return base_validate(path, iteritems(data), out)
File “/srv/homeassistant/lib/python3.5/site-packages/voluptuous/schema_builder.py”, line 427, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data[‘entity_id’]