Do not call update() in constructor (#8859)

This commit is contained in:
Fabian Affolter authored and Paulus Schoutsen committed 2017-08-06 10:21:55 -07:00
1 parent ac9c1235bb
commit d8ca04a4bc
19 files changed
+43 -57

No files matched your search

+1 -2
View File
@@ -38,7 +38,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
config.get(CONF_PORT))
if sensor.connection:
add_devices([sensor])
add_devices([sensor], True)
else:
return False
@@ -55,7 +55,6 @@ class ImapSensor(Entity):
self._port = port
self._unread_count = 0
self.connection = self._login()
self.update()
def _login(self):
"""Login and return an IMAP connection."""