def __asset_properties()

in functions/source/asset-model-converter/asset_converter.py [0:0]


    def __asset_properties(self, obj_type, external_id, asset_description, datastream_descriptions={}):
        properties = []

        for prop in asset_description['assetProperties']:
            if obj_type == 'device' and prop['name'] in datastream_descriptions:
                datastream_description = datastream_descriptions[prop['name']]
                properties.append({'id': prop['id'], 'alias': f"/urbanio/{obj_type}/{external_id}/{datastream_description['channel']}/{datastream_description['data_type']}"})
            else:
                properties.append({'id': prop['id'], 'alias': f"/urbanio/{obj_type}/{external_id}/{prop['name']}"})

        return properties