Skip to main content

system.kanoa.asset.addAsset

This function requires KanoaOPS module

Description

Adds an asset (kanoaOPS).

Syntax

addAsset(assetInfo, userId)
  • Parameters
      assetInfo (dictionary) - Dictionary containing asset information
      userId (int) - User ID for tracking changes.
  • Returns
      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
    asset_id = system.kanoa.asset.addAsset(assetInfo, userId)