Lamdba in rules file

Is it possible to use Lambdas which are defined in another rules files?

So Lambdas are not useful for my situation. I will go with Proxy Items

I’ve never tried it and can’t guarantee it will work, but theoretically you should be able to put a lambda into the shared cache. Back when I wrote that post there wasn’t a shared cache. See Rules | openHAB.

I can’t remember if it was added to Rules DSL before or after 3.4 release so if you see errors saying sharedCache is not defined you’ll have to wait for OH 4 to use it.

But IMO if you are heading down this path it’s a strong indication you’ve outgrown Rules DSL and one of the other languages might be a better fit.

Thanks for your remarks.
Do you have some lines of code how to use the “shared cache”?

I linked to the docs that talk about the shared cache which includes

For further documentation on using the cache see here

which includes examples. Do you have specific questions after reading those docs and examples?