I have a rule that tests for before dawn and after dusk. the rule does the following
Items:
DateTime DawnStart “Dawn start” {astro=“planet=sun,type=civilDawn,property=start”}
DateTime DuskEnd "Dusk end " {astro=“planet=sun,type=civilDusk,property=end”}
Rules:
if (now.isAfter ((DuskEnd.state as DateTimeType).zonedDateTime.toInstant.toEpochMilli)) {
turn on some lights
}
if (now.isBefore ((DawnStart.state as DateTimeType).zonedDateTime.toInstant.toEpochMilli)) {
turn on some lights
}
The DawnStart seems to work but the isAfter DuskEnd fires the opposite of what it should be.
I was running 2.3 stable but have since upgraded to lastest 2.4 snapshot and still the same thing happens.
Anyone can help I would appreciate it as all my rules for night and day are now not working. They worked fine in 1.x but not in 2.x.
Thanks again
Kim