def _add_device_skills(context): for value in context.skills.values(): skill, settings_display = value context.manifest_skill = add_device_skill(context.db, context.device_id, skill) settings_values = None if skill.skill_gid.startswith('bar'): settings_values = dict(textfield='Device text value') add_device_skill_settings(context.db, context.device_id, settings_display, settings_values=settings_values)
def _add_device_skills(context): """Link skills to devices for use in step code.""" for value in context.skills.values(): skill, settings_display = value context.manifest_skill = add_device_skill(context.db, context.device_id, skill) settings_values = None if skill.skill_gid.startswith("bar"): settings_values = dict(textfield="Device text value", checkboxfield="false") add_device_skill_settings( context.db, context.device_id, settings_display, settings_values=settings_values, )