Do not call update() in constructor (#8859)
This commit is contained in:
1 parent
ac9c1235bb
commit
d8ca04a4bc
19 files changed
+43
-57
No files matched your search
@@ -60,7 +60,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
name, SENSOR_TYPES[octo_type][3], SENSOR_TYPES[octo_type][0],
|
||||
SENSOR_TYPES[octo_type][1])
|
||||
devices.append(new_sensor)
|
||||
add_devices(devices)
|
||||
add_devices(devices, True)
|
||||
|
||||
|
||||
class OctoPrintSensor(Entity):
|
||||
@@ -82,8 +82,6 @@ class OctoPrintSensor(Entity):
|
||||
self.api_endpoint = endpoint
|
||||
self.api_group = group
|
||||
self.api_tool = tool
|
||||
# Set initial state
|
||||
self.update()
|
||||
_LOGGER.debug("Created OctoPrint sensor %r", self)
|
||||
|
||||
@property
|
||||
|
||||
Reference in new issue
Block a user