Ok, I am trying to create a rule on which certain things happen. Ill try to be as clear as possible.
In the evening when the sun sets I want the lights to turn on, and go off at 11pm.
In the morning at 7am the lights need to go on, and go off when the sun rises.
But the lights only need to go on when it is actually “dark” dark in this case means that in the morning the lights should go on at 7am but only if the sun hasn’t rised yet.
And in the evening the light need to go on at sunset, but need to go off at 11pm…
My rules file contains this:
rule "Lights On" when // Morning Lights On : Time cron "0 0 7 ? * * *" // Go on at 7am // ## and sunrise has not happend yet ## // Evening Lights On : Item Sunset_Event received update ON // Sunset happend then wcd001_schakelaar.sendCommand(ON) // Put lights on end rule "Lights Off" when // Morning Lights Off : Item Sunrise_Event received update ON // Sunrise happend // Evening Lights Off: Time cron "0 0 23 ? * * *" // go off at 11pm then wcd001_schakelaar.sendCommand(OFF) // Put lights off end
But I commented out a piece in which I don’t understand what to do with. It is in the Lights on rule at the morning part: // ## and sunrise has not happend yet ##
Can someone please shed a light on this?