State Description Language


having following pattern:


Regional Settings are all on de-DE. How can I transform the “B” (Month) to a german state.
Want to use it directly in my TTS without translation.

Greatings von Bremen :wink:

What’s your locale settings configure to? According to the docs B is supposed to return the locale name of the month already.

As mentioned I think allready set.

Perhaps the OS locale is misconfigured or there is some problem with Java picking up the locale from the OS. See java - How do I set the default locale in the JVM? - Stack Overflow for ways to explicitly set the locale for the JVM.

It should pick it up from the regional settings but :man_shrugging: . Like with the timezone, sometimes it doesn’t.

Perfekt hint!


Just saw some Booleans (from Switch) I want also overwrite. (not just translate with
What is documented for such?

ON= “warning”
OFF=“no alarm detected”

Is it possible over “State description”? (Otherwise I start a new topic)

Is it that you don’t want to use specifically or you don’t want to use the Map transformation service to do it?

And when you say “overwrite” do you mean you want to display it differently or do you actually want to change the state of the Item?

The state description can use the map transform with your own .map file to convert ON/OFF to what ever you want for display purposes. If you want to change the actual state of the Item you’ll have to use the Map transform at the Channel if supported or in a transform profile and you’ll have to change the type of the Item to a String.

No the state can stay whatever OH had invented for (ON/OFF; OPEN/CLOSED)
I just want to pick a state in script .getStateOfItem and put its value more ore less directly into a human readable String, that was not evaluated with if/else over and over again.

OK, then create your .map file, make sure the Map transformation is installed, and use the transform Action in the rule to invoke the Map transform.