Notification rule time based trigger - only if item is not 0

Hey community

I’m strugling with a rule, I can’t figure out what’s wrong im my logic.

What I want to achieve is, that if my marquise is open and it’s past a certain time it should trigger a notification. The notification should only be sent if the value IS NOT 0.

Right now the notification is sent every time, whether the value is 0 or not.

rule "Marquise Open Notification"

when

//rule triggers at 22.00    
Time cron "0 00 22 1/1 * ? *"

then
        //notifies only if the marquise level is other than 0
        if(HM_Marquise_Level.state != 0)

        logInfo("hm_marquise.rules", "sending notification")

        sendNotification("xxxx", "Marquise is open!")                     
      

end

I should probably add, the item HM_Marquise_Level is a Rollershutter type item.

// Structure of if()

if (condition) { do stuff enclosed in curly braces }

// same thing, laid out for legibility

if (condition) {
   do stuff in curly braces
}

// optional shortcut, omitting braces

if (condition)  do just this one thing

// implication

if (condition) do just this one thing
this thing always gets done, condition or no.

i.e. use curly braces for your own sanity.

ha jeez! Stupid of me, thx that obviously did the trick!