Warning in 3.2RC1

I upgraded via the openhabian Config tool intending to run 3.2.0.RC1. In the UI it’s listed as Build #2640. Is this RC1?

Getting this new warning since upgrading from 3.0.1:

 2021-12-19 08:09:57.720 [INFO ] [openhab.event.ChannelTriggeredEvent ] - logreader:reader:d019502abd:newWarningEvent triggered 2021-12-19 08:09:56.834 [WARN ] [le.handler.ItemStateConditionHandler] - Received a QuantityType state '64.454 °F' with unit for item Temperature_Outside, but the condition is defined as a plain number without unit (90), please consider adding a unit to the condition.

I tried removing the Item and re-creating it, which DID change the configuration from “Semantic Class: Point” and “Semantic Property: None” to “Semantic Class: Measurement” and “Semantic Property: Temperature”.

Both before and after are Type Number: Temperature.

I also removed the reference to these Items in the rule and recreated them after making the new Items.

This error is related to this rule:

configuration: {}
  - id: "1"
      itemName: Switch_Occupancy
      state: ON
    type: core.ItemStateUpdateTrigger
  - inputs: {}
    id: "7"
      itemName: Dehu_Wall_Switch
      state: ON
      operator: =
    type: core.ItemStateCondition
  - inputs: {}
    id: "3"
      itemName: Temperature_Outside
      state: "35"
      operator: ">"
    type: core.ItemStateCondition
  - inputs: {}
    id: "4"
      itemName: Temperature_Outside
      state: "90"
      operator: <
    type: core.ItemStateCondition
  - inputs: {}
    id: "2"
      itemName: Fresh_Air_Switch_First_Floor
      command: ON
    type: core.ItemCommandAction

Please mind the purpose of the thread I moved your post off from.

RC1 is RC1 and if you want that, change to milestone use.
If you see #2640 you are probably on snapshots.

I thought I WAS minding the purpose of the thread. This issue appeared when I upgraded.

I have now restored a backup of my 3.0.1 install, upgraded that to 3.1.1, verified that I did not have this issue, upgraded to 3.2.0.RC1, and verified that I now DO have this issue.

No, as @mstormi pointed out above, that looks like a snapshot build, so you would have to switch openHABian to use “milestones” instead.

But in any case, I don’t think that it will make a difference to your mentioned issue.
The warning actually tells you what you need to know:

the condition is defined as a plain number without unit (90)

So instead of state: "90", you should rather put state: "90 °F" in your condition.

Thanks for your response.

Yes as stated above I corrected the version I am using.

Your answer about the issue with the number makes sense except that there is no key on the keyboard to create the degree character (small circle). It’s a special character, right? I would think that since OH knows what units the Item is using it would default to those units when using the item in the rule. Is there some way to use that character that I’m not aware of so that I can just type it into the rule?

If you have an american keyboard layout, try Alt-GR+Shift+semicolon: British and American keyboards - Wikipedia

What makes you think it doesn’t do that? It’s just an INFO warning that assumptions are being made, which may not be correct, and it’s up to you to be more precise.

You can use cut and paste if that is easier than Kai’s method.

There are more than two choices for temperature, there is Kelvin which is commonly used by scientists world wide.

What about lengths? How would openHAB know what a random number is as it could be inches, Miles, feet, yard, or even the ‘chain’ measurement which are all Imperial. Speed is another one that is not clear, wind speed here is mostly used as Knotts over water, but often over land the wind is measured in km/hr. So it would be wrong to assume a Metric country only uses km/hr. Many countries and we all have our own version of the ‘right’ way that is not as simple as flicking a metric/imperial switch.

The only way to be consistent is to always specify what the unit is so that it is clear.

On Mac °=Option+Shift+8

Good point all around. Thanks, marking this solved.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.