[Do not call update(] in constructor, use add_entities(devices, True) instead
github-actions opened this issue · comments
github-actions commented
in constructor, use add_entities(devices, True) instead
if not ssl:
_LOGGER.warning("Use of HTTPS in production environment is highly recommended")
baby_buddy = BabyBuddyData(address, api_key, ssl, sensor_type)
if not baby_buddy.form_address():
return
# TODO: Do not call update() in constructor, use add_entities(devices, True) instead
baby_buddy.entities_update()
sensors = []
for data in baby_buddy.data:
sensors.append(BabyBuddySensor(data, baby_buddy))
add_entities(sensors, False)
# TODO: handle loading of children
def services_children_add(call):
54ad22cce48e8325c55ba8bf649bb9c9b92a46a6