My Christmas Rule

I will post my rules as well since you can never have enough examples. My crons are less engine driven and more explicit to my kids and my own vacations. Feedback is very much welcome, I hope this helps other as well. Merry Christmas everyone!!!

rule "Outside Christmas Lights On at Dusk"
when
  Channel 'astro:sun:48320974:set#event' triggered START
then
  seasonal_christmas_lights_front.sendCommand(ON)
end

rule "Outside Christmas Lights Off at Dawn"
when
  Channel 'astro:sun:48320974:rise#event' triggered START
then
  seasonal_christmas_lights_front.sendCommand(OFF)
end

rule "Inside Christmas Lights on"
when
  Time cron "0 30 15 ? NOV,DEC MON,TUE,WED,THU,FRI *" or Time cron "0 30 6 ? NOV,DEC SAT,SUN *" or Time cron "0 30 6 20,21,22,23 DEC ? *"
then
  seasonal_christmas_banisters.sendCommand(ON)
  seasonal_christmas_mantel.sendCommand(ON)
  seasonal_christmas_tree.sendCommand(ON)
  seasonal_christmas_table_runner.sendCommand(ON)
end


rule "Inside Christmas Lights off Bedtime Weekday"
when
  Time cron "0 0 1 ? NOV,DEC SUN,MON,TUE,WED,THU *"
then
  seasonal_christmas_banisters.sendCommand(OFF)
  seasonal_christmas_mantel.sendCommand(OFF)
  seasonal_christmas_tree.sendCommand(OFF)
  seasonal_christmas_table_runner.sendCommand(OFF)
end

rule "Inside Christmas Lights off Bedtime Weekend"
when
  Time cron "0 30 2 ? NOV,DEC FRI,SAT *"
then
  seasonal_christmas_banisters.sendCommand(OFF)
  seasonal_christmas_mantel.sendCommand(OFF)
  seasonal_christmas_tree.sendCommand(OFF)
  seasonal_christmas_table_runner.sendCommand(OFF)
end
1 Like