[SOLVED] Rule problem: Rule does fire, but comparison doesn't work

I fight with the comparison inside a rule - it just doesn’t work; I always end up in the ELSE path of the if. Where is my mistake?

    rule DaikinACSZ_Status
         Time cron "0 0/1 * 1/1 * ? *" 
        logInfo("RULE:DaikinACSZ_Status", "[INFO]: Temperatur im Schlafzimmer:" + DaikinSZTempIn.state)
         if(DaikinSZTempIn.state > 22)
            logInfo("RULE:DaikinACSZ_Status", "[INFO]: Temperatur im Schlafzimmer >22°C:" + DaikinSZTempIn.state)
            logInfo("RULE:DaikinACSZ_Status", "[INFO]: Temperatur im Schlafzimmer offenbar unter 22°C?")

The item has a state - here’s what the first loginfo gives back:

2019-06-30 11:21:00.099 [INFO ] [.model.script.RULE:DaikinACSZ_Status] - [INFO]: Temperatur im Schlafzimmer:24.5 °C

Item definition:

Number:Temperature DaikinSZTempIn  "Innentemperatur [%.1f °C]"       <temperature_inside>      { channel="opendaikin:ac_unit:192_168_1_60:indoortemp" }

I just don’t see it…

Thanks, Boby

This part sets the trap for you.

This part is the clue.
The Item state is 24.5 °C , it has temperature units attached.
You’re trying to compare it with 22
It’s an apples and oranges comparison.

Simplest is to give the orange units as well.
if (DaikinSZTempIn.state > 22 | "°C" ) {

@rossko57, thank you so much - you’re a genius. Now the comparison works!