system.kanoa.event.getOEEColors(paramsDict, oee, availability, performance, quality)
Returns a dictionary of colors for oee, a, p and q based on the OEE thresholds set for the asset and the passed in oee values. Asset OEE values are stored in the custom asset attribute _oeeThresholds.
Parameters
paramsDict Dictionary: Requires either assetPath, assetName, or assetId. assetPath is recommended.
| - a | Float | |
| - assetId | Integer | |
| - assetName | String | |
| - assetPath | String | |
| - oee | Float | |
| - oeeThresholds | Dictionary | Not required, but can be passed in to speed up execution. |
| - p | Float | |
| - q | Float | |
| - targetThreshold | Float |
oee Float: OEE value to check
availability Float: Availability value to check
performance Float: Performance value to check
quality Float: Quality value to check
Returns
oeeColors Dictionary i.e. {'performance' '--kcGood', 'availability' '--kcBad', 'quality' --kcOk'}
Example
paramsDict={'assetPath': 'Kanoa Industries'}
oee = 0.8
a = 0.6
p = 0.3
q = 0.8
print system.kanoa.event.getOEEColors(paramsDict, oee, a, p, q)
>>>
{'availability': '--kcBad', 'oee': '--kcGood', 'quality': '--kcGood', 'performance': '--kcBad'}