I get the following ‘problems’ in vscode and I wonder how to fix the warning messages (code runs ok).
val findSetpoint= [ GenericItem s | val parts = s.name.split("_") val setpoint_name = String.format("%s_%s_SetPoint", parts.get(0), parts.get(1)) Evo_SetPoint.members.findFirst[name.equals(setpoint_name)] as NumberItem ] rule "SomeRule" when .... then .... var setpoint = findSetpoint.apply(setpoint_status) .... end
I tried to do the following, but Item is not a type. Do I need to import something?
I can, of course, cast to a GenericItem, but that feels like a workaround.
val findSetpoint= [ Item s | .... ]