system.kanoa.asset.addMode
Description
Adds a new mode (kanoaOPS).Syntax
addMode(modeInfo, userId)- modeInfo (dictionary) - Dictionary containing mode information.
- userId (int) - User ID for tracking changes.
- modeId (int).
Code Examples
# Example Usage:
mode_info = {
'modeName': 'NewMode',
'modeTypeId': 1,
'enabled': True,
'canSelect': True,
'canSchedule': False,
'modeColor': '#00FF00',
'iconPath': '/path/to/icon'
}
user_id = 5
mode_id = system.kanoa.asset.addMode(mode_info, user_id)