Jump to content

What is the proper way to write this program?


gweempose

Recommended Posts

Posted

I want to write a program that will turn all my exterior lights on 15 minutes before sunset and turn them all off at sunrise. It seems like there are many ways to accomplish this. Would this work?

 

If

Sunset - 15 minutes to Sunrise (next day)

Then

Turn on front porch lights
Turn on dog run lights
Turn on patio lights

Else

Turn off front porch lights
turn off dog run lights
turn off patio lights

 

Or does it make more sense to have two separate programs. One to turn them on and the other to turn them off with no "else" statement?

Posted

The program is fine, however you might want to create an "ALL" Scene that contains the porch lights, dog lights and patio lights.

 

Then you can just say

Set Scene "ALL" On

&

Set Scene "ALL" Off

Posted

Michel, I was referring to a scene name "ALL" and doing a Set Scene ALL off. Not suggesting sending an All Off. How confusing I made it with my choice of scene name, sorry!

Guest
This topic is now closed to further replies.

×
×
  • Create New...