system.kanoa.event.addStateEvent(stateInfo, userId)
Adds a stateEvent record. All stateInfo keys are required.
Parameters
stateInfo Dictionary
| - assetId | Integer | |
| - assetStateId | Integer | Can set this to a sub asset if asset is down due to a downtime fault on a child cell otherwise set to assetId |
| - note | String | |
| - stateCode | Integer | |
| - tStamp | String |
userId Integer: Id of user executing the function
Returns
stateEventId Dictionary
Example
stateInfo = {'assetId': 18, 'assetStateId': 18, 'stateCode': 1, 'tStamp': system.date.now(), 'note': None}
userId = 123
stateInfo = system.kanoa.event.addStateEvent(stateInfo, userId)