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

* Do not call update() in constructor

* Fix lint issues
This commit is contained in:
Fabian Affolter authored and GitHub committed 2017-08-08 20:21:33 +02:00
1 parent 588b36dff2
commit f513f6271e
35 files changed
+142 -177

No files matched your search

+1 -3
View File
@@ -49,7 +49,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
plex_url = 'http://{}:{}'.format(plex_host, plex_port)
add_devices([PlexSensor(
name, plex_url, plex_user, plex_password, plex_server)])
name, plex_url, plex_user, plex_password, plex_server)], True)
class PlexSensor(Entity):
@@ -73,8 +73,6 @@ class PlexSensor(Entity):
else:
self._server = PlexServer(plex_url)
self.update()
@property
def name(self):
"""Return the name of the sensor."""