From 3aad223c955cdb586442c77944e3ffdfe8cf2858 Mon Sep 17 00:00:00 2001 From: pavoni Date: Tue, 2 Feb 2016 14:14:29 +0000 Subject: [PATCH] Change to warning if attributes missing. --- homeassistant/components/sensor/template.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/sensor/template.py b/homeassistant/components/sensor/template.py index b87e26aa415..fd2009b37e5 100644 --- a/homeassistant/components/sensor/template.py +++ b/homeassistant/components/sensor/template.py @@ -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 trace + _LOGGER.info(ex) + return _LOGGER.error(ex)