Rule to compare Temperature. Error message

I am getting the following message from one of my rules. How can I fix this?
[WARN ] [le.handler.ItemStateConditionHandler] - Received a QuantityType state ‘78.8 °F’ with unit for item openHAB7_ItemWorkshopDoorTemperature, but the condition is defined as a plain number without unit (65), please consider adding a unit to the condition.
Thank you

Somwhere in a rule you are comparing the state of an Item named “openHAB7_ItemWorkshopDoorTemperature” to the number 65. As the warning indicates, your Item isn’t just a Number, it’s a Number:Temperature which means it carries the units along with it. The warning is telling you that when you have units it’s best to compare it to a number that also has units.

How to do that is going to depend on the language and construction of the rule.

Here is my rule. I have others that work fine without this error, but they pull data from weather company. This one pulls the temperature from a sensor.

configuration: {}
  - id: "1"
      itemName: WorkshopLights_Power
      state: ON
    type: core.ItemStateChangeTrigger
  - inputs: {}
    id: "3"
      itemName: openHAB7_ItemWorkshopDoorTemperature
      state: "65"
      operator: <=
    type: core.ItemStateCondition
  - inputs: {}
    id: "2"
      itemName: WorkshopHeater_Power
      command: ON
    type: core.ItemCommandAction

Thank you

What matters is what Item type you are using, a Quantity type (with units) or a plain number. The rule doesn’t care how you populate it, but does care what it is populated with.

I changed it to Type Number. We will see what happens. Thank you

Don’t change stuff at random, have a plan.
What type is the channelof the binding here? If it is number:temperature, then you should link to a Number:Temperature type Item.
If you then want to compare the state value in a rule, you should compare to a temperature (with units) not to a number.

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