Do not call update() in constructor (#8878)
* Do not call update() in constructor * Fix lint issues
This commit is contained in:
1 parent
588b36dff2
commit
f513f6271e
35 files changed
+142
-177
No files matched your search
@@ -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."""
|
||||
|
||||
Reference in new issue
Block a user