Dsl rule condition not executed

I am currently migrating tot OH3 and most of the simple DSL rules are converted with success.

But i have one rule with a condition and it this doesn’t seem te be used.
I created this with the main UI .

But when I run this rule (play icon in UI) no logInfo is sent (logInfo in other rules work).
Only the send command is in the event log.
The condition seems to be skipped ?

I also tried to restart openhab but doesn’t make a difference.

  triggers:
  - id: "1"
    configuration:
      cronExpression: 0 30 6 ? * * *
    type: timer.GenericCronTrigger
conditions:
  - inputs: {}
    id: "1"
    configuration:
      type: application/vnd.openhab.dsl.rule
      script: >
        var sunrise = (LocalSun_StartTime.state as
        DateTimeType).getZonedDateTime()

        logInfo('logtest','condition')

        now.plusMinutes(30).isBefore(sunrise.toInstant.toEpochMilli)
    type: script.ScriptCondition
actions:
  - inputs: {}
    id: "3"
    configuration:
      itemName: HM_SW_OVERKAPPING_VOORDEUR
      command: OFF
    type: core.ItemCommandAction

You for sure saved the rule before clicking run?

I don’t see anything wrong with the rule otherwise that would cause the Condition not to run.

It was an error “type mismatch long to chronodatetime”
i use fronttail but this error was not in event log but in openhab.log . So thats why i first didnt see it :blush:

In that case the problem is probably all that unnecessary toInsant stuff.

now.is a ZonedDateTime. sunrise is a ZonedDateTime. is before takes aZonedDateTime as an argument.