[SOLVED] Need help with temperature conversion, Please

I am working with a Pi3+
Z wave Stick
Zooz Zse40 4/1 Sensor
Qubino 2 - relay (temperature)
OpenHab2, current Milestone build
I need help converting C to F for my temperatures, ya I am in the US
When I use the Simple mode to ad the thing all works fine. I get fahrenheit in Paper Ui and in HabPanel
But as soon as I manually create an ‘item line’ in the “XXXX.items” it reverts to C unless in VS I create the line using channels.
I researched in the Openhab documents, tried I think every, every change, added Java and JSONPath transformations and associated fixes to no eval.
Please help I am nearly bald from my last question!

We need lots more information.

What does the Channel say the Item needs to be?

How did you define your Item?

Well I tend to attack one challenge at a time and as I wrote above it’s temperature.
I think I setup the system properly so when Openhad creates the binding I get (F). When I formulate my own code in VS the conversion from C to F doesn’t work. Not being a programmer, but being a computer / network admin I know enough to be dangerous :slight_smile: Do I need to add (What?) transformation? Do I need to add lines to setup values or import links?
“Number:Temperature” to answer your question.
Thanks for your help!

In answer to which question? I asked two. Does the Channel say you need to use Number:Temperature, or the way that you actually defined the Item? is with Number:Temperature, or both?

All of this stuff needs to line up and match. We tend not to ask idle questions. I really do need all questions I ask and requests for further information answered. It’s no fun to play 20 questions.

Since something is Number:Temperature you should review https://www.openhab.org/docs/concepts/units-of-measurement.html#units-of-measurement

Sorry I did not see the question below the graphic.

Below is what I have,
1st line is generated by the Visual Studio and yields fahrenheit. Great!
2nd line I created and it yields Celsius.
3rd line In my version as an example, I tried the example shown in the documentation. I did try various different approaches

Number:Temperature SensorTemperature "Sensor (temperature)" {channel="zwave:device:46090dd8:node8:sensor_temperature"}

Number Sensor_Bath_Temp         "In the bathroom"

Number Sensor_Bath_Temp         "In the bathroom [JS(convert-C-to-F.js):%.1f °F]"

Use Number:Temperature and you shouldn’t have to perform any conversions. At most you many need to supply a °F to tell it what units you want. But if you set your region and preferred units in PaperUI it should default to °F if you chose Imperial units.

What you don’t show is how Sensor_Bath_Temp get’s its values. What is it linked to?

Setting the region was the first place I went when everything was reporting °C.
To your last question , I hope I understand it, this is my process.

  1. I add a ‘thing’ with the system set to ‘item link’ is “simple mode”. This automatically generates the linked item and reports in °F.
  2. I create code using VS in (home.items) example: Sensor_Bath_Temp.
  3. I change the system setting in ‘item link’ to turn off “simple mode”. This displays the ‘items’
  4. In paper UI > Things > I open up the respective ‘thing’ showing the channels. I open the channel and add my created code by pressing the (+ button) and select the code I created to link it.
    Now I have 2 ‘items’ linked to the same ‘thing’ and get two different values °F and °C.
    I hope this helps!

It all boils down to this.

If the Channel says Number:Temperature you MUST link it to an Item defined with Number:Temperature.

You are not doing this in the Items you posted above. I’ve tried to say this twice now.

Number:Temperature Sensor_Bath_Temp         "In the bathro

Have you done this?

Got it!