HTTP Binding stateTransformation does not work for switch types

I have 3 Raumfeld devices in my house and I’m running a raumserver next to Openhab which makes the devices accessible via HTTP requests. In the first step I want to turn them on or off using Openhab.
My thing config looks like this:

Thing http:url:raumfeld "Raumfeld" [ baseURL="", refresh=10] {
      Type switch : PowerSwitchKitchen    [ commandExtension="/controller/%2$s?id=Kueche",      stateExtension="/data/getRendererState?id=Kueche", onValue="leaveStandby", offValue="enterAutomaticStandby", stateTransformation="JSONPATH:$.data[0].rooms[0].PowerState∩" ]
     // ...

I checked the state transformations multiple times and according to the log everything looks fine:

2021-03-28 09:39:15.504 [DEBUG] [ternal.JSonPathTransformationService] - transformation resulted in 'MANUAL_STANDBY'
2021-03-28 09:39:15.539 [DEBUG] [ap.internal.MapTransformationService] - Transformation resulted in 'OFF'

The looks like this


Unfortunately the Openhab switch in BasicUI does not work. When I turn on the device manually the power switch remains in state OFF. When I turn on the device using Openhab, it is turned on, so the commandExtension part of the HTTP binding works, but the state of the switch immediately turns to OFF again as somehow the transformation result is not regarded as a valid ON/OFF state.

2021-03-28 10:54:48.065 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'item_bathroom_raumfeld_power' received command ON
2021-03-28 10:54:48.082 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'item_bathroom_raumfeld_power' predicted to become ON
2021-03-28 10:54:48.119 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'item_bathroom_raumfeld_power' changed from UNDEF to ON
2021-03-28 10:54:56.555 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'item_bathroom_raumfeld_power' changed from ON to UNDEF

I found several hints in other posts that I should set quotes around the values in the map but none of the combinations worked yet.


You did configure treating leaveStandby as ON, not ON. So you need to map whatever should result in ON to leaveStandby.