I’m sure I’ve seen somewhere that the | is purely for rules, not needed here.
But is the rfxcom channel really a Quantity type? I don’t think you can offset a simple number with a quantity with units and expect it to work.
If that is the problem,you should be able to do this with a JS transform profile instead - do the numeric offset and add " °C" to return string,mating number channel to Number:Temperature Item.
So far as I can see, the profile is intended to provide an offset.
2345 + 1
22km + 100m
Like for like.
Not intended to add units to a number.
23 + 1 °C
would make no sense - 23 what? °K °F
I might be wrong that your channel is a plain number, and there is a profile bug. Would you check?
What I’m asking about is the binding channel type that you have linked your Item to. These have types, just like Items, The RFXCOM binding docs are not super clear on this, but it looks like plain number channel.
The binding Channel dictates what type of Item needs to be linked to that Channel. Therefore the Binding Channel will dictate whether or not to use a Number or a Number:Temperature. If the binding doesn’t say Number:Temperature, you can’t use a Number:Temperature.
The profile only works when it uses the same units as the Item. If it’s a Number Item, you can’t use units in the offset profile. If it’s a Number:Temperature, you must use a temperature unit in the offset profile.
tl;dr: It has to match up from end to end. If the binding doesn’t require Number:Temperature, you can’t use units anywhere along the line. If the binding does require Number:Temperature, you must use units everywhere along the line.
Even if the RFXCOM binding is Number i have used Number:Temperature and the only thing i have had problem with is Profile offset.
Then maybe i do a PR to add Units to the rfxcom binding.
I will try the offset on another binding that i know is using Units for the Items.(I have built it )
Yep, the “in” and the “out” of the profile don’t match.
You can make your Item into a Number type and apply offset profile without units.
Or you can, as previously suggested, use a transform profile with script to both offset and add units to the plain number channel, and match it to the Number:Temperature Item.
Don’t see why not.
But it’s only sensible if the end device either consistently only supplies data in one unit form (e.g no C/F option), or supplies units info along with the data.