Unknown errors in log

After moving to .35 (I’m now on .35.3) I see some new errors in the log that also with logging in Debug mode I don’t really understand. I get the “undefined errors” (know issue and can be solved via a work around I’m to lazy for ) but I don’t get what’s after that.

Any help appreciated.

16-12-29 22:08:55 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'attributes'
16-12-29 22:08:55 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'attributes'
16-12-29 22:08:55 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'attributes'
16-12-29 22:08:55 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'state'
16-12-29 22:08:55 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'state'
16-12-29 22:08:55 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'attributes'
16-12-29 22:08:55 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'state'
16-12-29 22:08:55 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'state'
16-12-29 22:08:55 homeassistant.components.sensor.template: UndefinedError: 'None' has no attribute 'state'
16-12-29 22:08:59 homeassistant.helpers.condition: Value cannot be processed as a number: not set
16-12-29 22:09:00 homeassistant.core: Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 99, in async_render
    return self._compiled.render(kwargs).strip()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/sandbox.py", line 329, in getattr
    value = getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'sensor' is undefined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/core.py", line 1054, in execute_service
    service_handler.func(service_call)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/notify/__init__.py", line 107, in notify_message
    kwargs[ATTR_MESSAGE] = message.render()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 86, in render
    self.hass.loop, self.async_render, kwargs).result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 402, in result
    return self.__get_result()
  File "/usr/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py", line 167, in run_callback
    future.set_result(callback(*args))
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 101, in async_render
    raise TemplateError(err)
homeassistant.exceptions.TemplateError: UndefinedError: 'sensor' is undefined

They both look like they are from the same issue - which you know about - of the system reading in values of sensors before they are initialized. I see these too as I still have some templates that I haven’t setup with that workaround that’s been mentioned.

Thanks. Probably made the last sendor after updating and did not connect the two. Guess I have to live with either the log or the workaround.

I have so many template sensors that I would have to update that I am living with it and hoping the behavior is updated in some future build.

I just realized how lazy that sounds… :stuck_out_tongue_closed_eyes:

try tepmlate like this:
message: "Temp is {{states('sensor.temp')}}"