def set_values(self, profile, data, status, properties):
if not self.init_ok or profile is None:<EOL><INDENT>return data, status<EOL><DEDENT>for shortcut, value in properties.items():<EOL><INDENT>target = profile.find(shortcut=shortcut)<EOL>if not target:<EOL><INDENT>self.logger.warning('<STR_LIT>', shortcut)<EOL>continue<EOL><DEDENT>if target.name == '<STR_LIT:value>':<EOL><INDENT>data = self._set_value(target, value, data)<EOL><DEDENT>if target.name == '<STR_LIT>':<EOL><INDENT>data = self._set_enum(target, value, data)<EOL><DEDENT>if target.name == '<STR_LIT:status>':<EOL><INDENT>status = self._set_boolean(target, value, status)<EOL><DEDENT><DEDENT>return data, status<EOL>
Update data based on data contained in properties