Map number value to string


I’m trying to translate a number item which can assume a value between 1 and 8 to a string. Like 1=Home, 2=Away, 3=Whatever. So far I have an HTTP Thing with a channel that returns a number value. Code looks like this:

UID: http:url:e6162a0ae4
label: Syr SafeTech Connect
thingTypeUID: http:url
  authMode: BASIC
  ignoreSSLErrors: true
  delay: 0
  stateMethod: GET
  refresh: 2
  commandMethod: GET
  timeout: 3000
  bufferSize: 2048
  - id: SyrActiveProfile
    channelTypeUID: http:number
    label: Active Profile
    description: ""
      mode: READONLY
      stateExtension: get/PRF
      stateTransformation: JSONPATH:$.getPRF

I have then created a String item and linked it to the channel. The item has the profile set to MAP and a map file was created under transform with the respective mapping:


Unfortunately it doesn’t work and the log shows

2023-03-13 18:08:42.580 [WARN ] [al.profiles.MapTransformationProfile] - Could not transform state '1' with function '' and format '%s'

What am I doing wrong? (Map service installed)


anyone?? :slightly_smiling_face:

Can you provide us with the .items file?

I have created everything in Paper UI: