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

+2 -2
View File
@@ -92,10 +92,10 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
dev = [BH1750Sensor(sensor, name, SENSOR_UNIT,
config.get(CONF_MULTIPLIER))]
_LOGGER.info("Setup of BH1750 light sensor at %s in mode %s is complete.",
_LOGGER.info("Setup of BH1750 light sensor at %s in mode %s is complete",
i2c_address, operation_mode)
async_add_devices(dev)
async_add_devices(dev, True)
class BH1750Sensor(Entity):