Remove unneeded entity_id check and blank lines.

This commit is contained in:
pavoni 2016-02-04 17:24:38 +00:00
parent b20d3f8b3a
commit ced380f0cd
2 changed files with 2 additions and 11 deletions

View file

@ -94,10 +94,7 @@ class SensorTemplate(Entity):
def _update_callback(_event):
""" Called when the target device changes state. """
# This can be called before the entity is properly
# initialised, so check before updating state,
if self.entity_id:
self.update_ha_state(True)
self.update_ha_state(True)
self.hass.bus.listen(EVENT_STATE_CHANGED, _update_callback)