system.kanoa.asset.addAsset
Description
Adds an asset (kanoaOPS).Syntax
addAsset(assetInfo, userId)- assetInfo (dictionary) - Dictionary containing asset information
- userId (int) - User ID for tracking changes.
- assetId (int).
Code Examples
# Example Usage:
assetInfo = {
'assetName': 'SampleAsset',
'parentId': 1,
'assetTypeId': 1,
'assetGroupId': 2,
'oee': 1.0,
'a': 0.9,
'p': 0.8,
'q': 0.7,
'targetThreshold': 0.85,
'oeeType': 'OEE_Enabled',
'sortOrder': 1,
'enabled': True
}
userId = 5
assetId = system.kanoa.asset.addAsset(assetInfo, userId)