I upgraded snips to the latest version and after that one of my snips intent isn’t working anymore. This is the error I get:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/template.py", line 140, in async_render
return self._compiled.render(kwargs).strip()
File "/srv/homeassistant/lib/python3.5/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/srv/homeassistant/lib/python3.5/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/srv/homeassistant/lib/python3.5/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "<template>", line 16, in top-level template code
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/template.py", line 456, in forgiving_round
value = round(float(value), precision)
jinja2.exceptions.UndefinedError: 'None' has no attribute 'state'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/intent.py", line 64, in async_handle
result = await handler.async_handle(intent)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/intent_script/__init__.py", line 88, in async_handle
response.async_set_speech(speech[CONF_TEXT].async_render(slots),
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/template.py", line 142, in async_render
raise TemplateError(err)
homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'state'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/snips/__init__.py", line 139, in message_received
hass, DOMAIN, intent_type, slots, request['input'])
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/intent.py", line 75, in async_handle
'Error handling {}'.format(intent_type)) from err
homeassistant.helpers.intent.IntentUnexpectedError: Error handling GetInformation
And this is the intent:
GetInformation:
speech:
type: plain
text: >
{%- if object == "3D Drucker" -%}
{%- if is_state('binary_sensor.octoprint_printing', 'off') -%}
Zur Zeit wird nichts gedruckt.
{%- else -%}
Der Druck ist zu {{states.sensor.octoprint_job_percentage.state|round(0)}}
% erledigt. Es verbleiben noch
{{(states.sensor.octoprint_time_remaining.state|float/60)|round(0)}}
Minuten.
{%- endif -%}
{%- elif object == "Wetter" and future == "ist" -%}
Zur Zeit sind {{states.sensor.dark_sky_temperature.state|round(0)}}
Grad Celsius. Gefühlt sind es
{{states.sensor.dark_sky_apparent_temperature.state|round(0)}} Grad.
{{states.sensor.dark_sky_hourly_summary.state}}. Es wird heute eine
Temperatur von bis zu
{{states.sensor.dark_sky_daytime_high_apparent_temperature_0.state|round(0)}}
Grad erreicht.
{%- elif object == "Wetter" and future == "wird" -%}
Die Aussichten für die Woche.
{{states.sensor.dark_sky_daily_summary.state}}