OpenHAB3 / Thing Status / How to extract the thing status and work with it on items

That’s frequently not the case.

I’ve only a Python version.

https://github.com/rkoshak/openhab-rules-tools/tree/main/rules_utils