Hi,
After my holidays I’ve been able to update from version 0.49.0 to version 0.50.2.
After upgrade I have a problem I cannot find any solution.
My apiai configuration looks like https://github.com/hokus15/home-assistant-config/blob/master/apiai.yaml
If I run /srv/hass/bin/hass --script check_config
with version 0.49.0 I don’t get any error.
If I run /srv/hass/bin/hass --script check_config
with version 0.50.2 I get the following error:
Traceback (most recent call last):
File "/srv/hass/lib/python3.4/site-packages/homeassistant/config.py", line 571, in async_process_component_config
config = component.CONFIG_SCHEMA(config)
File "/srv/hass/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 221, in __call__
return self._compiled([], data)
File "/srv/hass/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 538, in validate_dict
return base_validate(path, iteritems(data), out)
File "/srv/hass/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 370, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data['apiai']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/logging/__init__.py", line 980, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position 311: ordinal not in range(128)
Call stack:
File "/srv/hass/bin/hass", line 11, in <module>
sys.exit(main())
File "/srv/hass/lib/python3.4/site-packages/homeassistant/__main__.py", line 346, in main
return scripts.run(args.script)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/scripts/__init__.py", line 57, in run
return script.run(args[1:]) # type: ignore
File "/srv/hass/lib/python3.4/site-packages/homeassistant/scripts/check_config.py", line 99, in run
res = check(config_path)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/scripts/check_config.py", line 251, in check
bootstrap.from_config_file(config_path, skip_pip=True)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/bootstrap.py", line 168, in from_config_file
config_path, hass, verbose, skip_pip, log_rotate_days)
File "/usr/lib/python3.4/asyncio/base_events.py", line 271, in run_until_complete
self.run_forever()
File "/usr/lib/python3.4/asyncio/base_events.py", line 244, in run_forever
self._run_once()
File "/usr/lib/python3.4/asyncio/base_events.py", line 1081, in _run_once
handle._run()
File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
self._callback(*self._args)
File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
result = next(coro)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/setup.py", line 160, in _async_setup_component
conf_util.async_process_component_config(hass, config, domain)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/config.py", line 573, in async_process_component_config
async_log_exception(ex, domain, config, hass)
File "/usr/lib/python3.4/unittest/mock.py", line 896, in __call__
return _mock_self._mock_call(*args, **kwargs)
File "/usr/lib/python3.4/unittest/mock.py", line 962, in _mock_call
ret_val = effect(*args, **kwargs)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/scripts/check_config.py", line 215, in mock_except
MOCKS['except'][1](ex, domain, config, hass)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/config.py", line 342, in async_log_exception
_LOGGER.error(message)
Message: 'Invalid config for [apiai]: not a valid value for dictionary value @ data[\'apiai\']. Got OrderedDict([(\'intents\', OrderedDict([(\'heating.check\', OrderedDict([(\'speech\', \'{%- set status ={"on": "conectada", "off": "desconectada"} -%} La calefacci\xf3n est\xe1 {{ status[states("switch.termostato")] }}. {% if is_state("switch.termostato", "on") %}{% if states("climate.termostato") != "0"%} A una temperatura de {{ states("climate.termostato") }} grados.{% endif -%} {% if is_state_attr("climate.termostato", "operation_mode", "idle") %} No est\xe1 en marcha{%- else %} Est\xe1 en marcha{% endif -%}.... (See /home/hass/.homeassistant/configuration.yaml, line 280). Please check the docs at https://home-assistant.io/components/apiai/'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
File "/srv/hass/lib/python3.4/site-packages/homeassistant/config.py", line 571, in async_process_component_config
config = component.CONFIG_SCHEMA(config)
File "/srv/hass/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 221, in __call__
return self._compiled([], data)
File "/srv/hass/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 538, in validate_dict
return base_validate(path, iteritems(data), out)
File "/srv/hass/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 370, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data['apiai']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.4/logging/__init__.py", line 980, in emit
stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position 306: ordinal not in range(128)
Call stack:
File "/srv/hass/bin/hass", line 11, in <module>
sys.exit(main())
File "/srv/hass/lib/python3.4/site-packages/homeassistant/__main__.py", line 346, in main
return scripts.run(args.script)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/scripts/__init__.py", line 57, in run
return script.run(args[1:]) # type: ignore
File "/srv/hass/lib/python3.4/site-packages/homeassistant/scripts/check_config.py", line 99, in run
res = check(config_path)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/scripts/check_config.py", line 251, in check
bootstrap.from_config_file(config_path, skip_pip=True)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/bootstrap.py", line 168, in from_config_file
config_path, hass, verbose, skip_pip, log_rotate_days)
File "/usr/lib/python3.4/asyncio/base_events.py", line 271, in run_until_complete
self.run_forever()
File "/usr/lib/python3.4/asyncio/base_events.py", line 244, in run_forever
self._run_once()
File "/usr/lib/python3.4/asyncio/base_events.py", line 1081, in _run_once
handle._run()
File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
self._callback(*self._args)
File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
result = next(coro)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/setup.py", line 160, in _async_setup_component
conf_util.async_process_component_config(hass, config, domain)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/config.py", line 573, in async_process_component_config
async_log_exception(ex, domain, config, hass)
File "/usr/lib/python3.4/unittest/mock.py", line 896, in __call__
return _mock_self._mock_call(*args, **kwargs)
File "/usr/lib/python3.4/unittest/mock.py", line 962, in _mock_call
ret_val = effect(*args, **kwargs)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/scripts/check_config.py", line 215, in mock_except
MOCKS['except'][1](ex, domain, config, hass)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/config.py", line 342, in async_log_exception
_LOGGER.error(message)
Message: 'Invalid config for [apiai]: not a valid value for dictionary value @ data[\'apiai\']. Got OrderedDict([(\'intents\', OrderedDict([(\'heating.check\', OrderedDict([(\'speech\', \'{%- set status ={"on": "conectada", "off": "desconectada"} -%} La calefacci\xf3n est\xe1 {{ status[states("switch.termostato")] }}. {% if is_state("switch.termostato", "on") %}{% if states("climate.termostato") != "0"%} A una temperatura de {{ states("climate.termostato") }} grados.{% endif -%} {% if is_state_attr("climate.termostato", "operation_mode", "idle") %} No est\xe1 en marcha{%- else %} Est\xe1 en marcha{% endif -%}.... (See /home/hass/.homeassistant/configuration.yaml, line 280). Please check the docs at https://home-assistant.io/components/apiai/'
Arguments: ()
2017-08-16 20:48:53 ERROR (MainThread) [homeassistant.setup] Setup failed for apiai: Invalid config.
I also tried to modify the config files to use the new intent_script component with the same results.
Any idea what I’m doing wrong?
Thanks!