Merge pull request #1564 from balloob/fix_template_race_condition
Fix remaining race condition in template components.
This commit is contained in:
commit
c093a2bf54
4 files changed
+5
-5
No files matched your search
@@ -82,7 +82,7 @@ class SensorTemplate(Entity):
|
||||
|
||||
def _event_listener(self, event):
|
||||
"""Called when the target device changes state."""
|
||||
if not hasattr(self, 'hass'):
|
||||
if not hasattr(self, 'hass') or self.hass is None:
|
||||
return
|
||||
self.update_ha_state(True)
|
||||
|
||||
|
||||
Reference in new issue
Block a user