Openhab 4 display shorten item state

Hi,
I have integrated Bosch washer, disher and dryer. All works OK.
My state from e.g. washing temperature looks like: LoundryCare.Washer.EnumType.Temperature.GC60
For short state like 60 Celsius I can use map transformation.
How can I shorten item state with another OH4 transformation method (script) please ?
Thanks for help.

Rpi4 Rasbian Bullseye, OH4

The tutorials and solutions category is for posting a solution, not for asking for one. I’ve move this to a more appropriate category.

The easiest would probably be to use a REGEX Transform.

To get just the number at the end it’s a simple REGEX(.*C([\d]+)) for the temperature and REGEX(.*M([\d]+)) for the speed.

If you apply these at the Channel or in a transform profile you can make Spin Speed be a Number:Frequency and the Washing Program Temperature be a Number:Temperature type Item. Then it can be used in math in rules and such much more easily.

Thanks, sorry for wrong post placement.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.