Merge pull request #1099 from balloob/sensor_template_startup_error

Sensor template startup error
This commit is contained in:
Paulus Schoutsen committed 2016-02-02 18:32:09 -08:00
commit b14f7f7ed0
2 files changed
+24 -3

No files matched your search

@@ -126,4 +126,9 @@ class SensorTemplate(Entity):
self._state = template.render(self.hass, self._template)
except TemplateError as ex:
self._state = STATE_ERROR
if ex.args and ex.args[0].startswith(
"UndefinedError: 'None' has no attribute"):
# Common during HA startup - so just a warning
_LOGGER.warning(ex)
return
_LOGGER.error(ex)