Lambda Procedure error: java.lang.NullPointerException

I probably wouldn’t implement this with a lambda anyway. I’d create one Rule triggered by all the Items you want this to operate with (on OH 2.3 triggered by a Member of GroupName trigger instead) and apply Design Pattern: Associated Items to access the LastUpdated and PreviousValue. Then put the parts that are different in their own Rules. This would be an application of Design Pattern: Separation of Behaviors.

Depending on what else you need to do that is different between the two, you could even merge those rules if there isn’t that much and use if(triggerintItem instanceof DimmerItem) to determine what you are dealing with. Obviously, there is a balance between a long Rule that does everything and short Rules that are easier to read but sometimes, IMHO, it just isn’t worth the effort to solve some problems like this that make no sense.

I’m truly stumped on the lambda but I’ve long since eliminated all the lambdas from my setup so don’t have recent experience with them. But I’ve not seen anywhere reported similar issues on the forum.

The warnings in VSCode still give me pause though. When there is more than one weird thing going on they are usually related. I’ve pasted your Rule in from above with the Procedure and my VSCode does not identify any errors at all. That in-and-of-itself is suspicious and points to perhaps a more significant problem with your setup or environment. I’ll admit it seems unlikely but when the weirdness piles up the problem is often a failing SD card.