def to_dict(self):
        '''Save this target component into a dictionary.'''
        d = {'componentId': self.component_id,
                'instanceName': self.instance_name}
        props = []
        for name in self.properties:
            p = {'name': name}
            if self.properties[name]:
                p['value'] = str(self.properties[name])
            props.append(p)
        if props:
            d[RTS_EXT_NS_YAML + 'properties'] = props
        return d