Insight conditions and severity levels
As mentioned in the previous article on Insights, conditions allow us to trigger dynamic information based on datapoint values. For example we can define a critical error condition when an anomaly is detected or a success condition otherwise.

Different severity levels
States like critical error or success are categorized under severity levels. Insights offer four severity levels:
- Informative: White-labeled condition without icons or dynamic animations. Used to display information values.
- Success: Green-labeled condition with a success tick icon. Indicates positive values, e.g., a value of
1
in an Anomaly Detection solution, meaning no anomaly detected. - Warning: Yellow-labeled condition with a warning icon. Highlights values nearing abnormal thresholds, e.g., elevated motor bearing vibration levels that haven’t yet caused failure.
- Critical / Error: Red-labeled condition with an error sign icon and a dynamic blinking alerton the component. Triggered for critical issues, e.g., a value of
-1
in Anomaly Detection, indicating a detected anomaly.
Operate with conditions
Creating a condition
Following the example from Tutorial: Anomaly Detection Solution, you can link the logical datapoint mt1_bearing_anomaly
to an insight. This would trigger a critical error alert if an anomaly is detected or display a success state otherwise.
After creating an insight with basic fields filled such as the insight name and the associated datapoint, we define Insight conditions using basic if statements .
For instance, we will assign a successNo anomaly detected
name if value is greater than or equal to 0
(since 1 indicates no anomaly). Otherwise, we will display Anomaly detected
as a critical error.

You can create multiple insights for an asset/component tile, but each insight applies to a specific datapoint
Alternatively, you can add conditions using the Python toolkit by applying the add_condition()
method on the object to define severity levels with a dictionary structure like this:
conditions = [
{
"severity": 2,
"name": "No anomaly detected",
"type": "gte",
"value": 0
},
{
"severity": 0,
"name": "Anomaly detected",
"type": "lt",
"value": 0
}
]
for condition in conditions:
insight_twin_object.add_condition(condition)
wizata_dsapi.api().update(insight_twin_object)
Condition Paremeters
severity
is an integer between 0 and 4:0
: Critical / Error1
:Warning2
:Success3
: Informative
name
(string): The title displayed in the asset/component card.type
(string): The relational operators used in the condition. Available options:lte
: Less or equal than (<=)gte
: Greater or equal than (>=)gt
: Greater than (>)lt
: Less than (<)eq
: Equal (==)neq
: Not equal (!=)
value
as the reference value to be compared.
Editing a condition
To modify an existing Insight condition, use .update_condition()
by specifying the index of the condition to be updated, and the dictionary with the updated values.
condition_updated = {
"severity": 0,
"name": "Anomaly detected UPDATED",
"type": "lt",
"value": 0
}
insight_twin_object.update_condition(1, condition_updated)
wizata_dsapi.api().update(insight_twin_object)
Or using the UI, by clicking on the Edit button in the top-right corner of the card:

Remember to save your changes after updating the Insight settings.
Always use .update() to apply modifications to existing Insights on the platform.
You can check all the possible methods for the Insight entity in our Python SDK documentation article.
Deleting a condition
To remove a condition, use the .remove_condition()
method by passing the index of the condition to be removed (stored inside the conditions list of our Insight object).
insight_twin_object.remove_condition(1)
wizata_dsapi.api().update(insight_twin_object)
Or delete it from the UI by clicking on the trash icon next to the insight we want to delete

Clearing all conditions
To remove all conditions from an Insight, use the .clear_conditions()
method on the insight object:
insight_twin_object.clear_conditions()
wizata_dsapi.api().update(insight_twin_object)
Or inside the platform, clicking on Clear conditions and then Save

Getting a list of Insights to be edited
You can also use the Python toolkit to obtain a list of all the insights, using .search_insights()
.
For example, we can use this method to store all the components and twins IDs of the insights with Critical/Error severity levels in separate lists using the following logic:
twin_id_with_errors = []
component_id_with_errors = []
page = 1
page_size = 20
has_more = True
while has_more:
insights = wizata_dsapi.api().search_insights(page=page, size=page_size)
for insight in insights.results:
if any(condition.get("severity") == 0 for condition in insight.conditions):
if insight.twin_id:
twin_id_with_errors.append(insight.twin_id)
if insight.component_id:
component_id_with_errors.append(insight.component_id)
page += 1
has_more = len(insights.results) == page_size
You can create your own logic using .search_insights()
to automate processes like e.g. updating insights that share the same datapoint ID with new severity levels, or migrating all the conditions from a particular insight to another twin.
Updated 28 days ago