[SOLVED] Doing comparision with a number variable doesn't work

  • Platform information:
    • openHAB version: openHAB 2.5.7 Release Build on docker
  • Issue of the topic:
    I think a have a rather simple problem but still after searching here in the community I can’t find an answer and I’m sure that is due to my lack of knowledge (sorry for that in advance).

I have a var with a value of, e.g. varTest.State equals to “0.009313282247803183 km” (format Number:Length)

I just want to use the value in an if statement, e.g. if( varTest.state < 1 ) {…
But the rule never works.
Do I have to convert my varTest somehow?

Any help appreciated.


@rossko57 thank you so much, this was driving me crazy. And another example that searching for a problem with the right terms brings up a solution… my bad English ;(