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