Jump to content

Conditional commands


gschoffstall
Go to solution Solved by paulbates,

Recommended Posts

Posted

A program acts to turn on a set of lights. It has IF commands to check if a motion sensor is on, a remote switch has been pressed, or if an X10 command has been issued. I need to make the program time sensitive to make the lights come on dim within a time range, but leave the rest of the functionality alone. Can this be done within the same program? If not, how? Thanks.

  • Solution
Posted

It should be possible... Use the "schedule" clauses with AND and the other device conditions.

It's hard to be more specific without more info or a sample program you might have started

Posted

Here's the subject program as it is currently working. Problem is, at night the 100% command is jarring. I want to modify the action of the motion detector to only set the Bedroom 2 level at 20% between, say 10:00 pm and 6:00 am. I just don't know how to fit that in with the current structure. Any suggestions are welcome. Thanks.

image.png.31d52cf0d7787b826306bf759547e6c4.png

 

 

Posted

It depends.  If the device accepts percentage commands then the easiest way would be to set the percentage.  Although there may be better ways to do this depending on the type of device.

Screenshot 2023-12-27 at 3.49.50 PM.png

Posted

I take a different approach. I have three programs - two for the conditions at night before and after midnight (Breezeway Motion Off Dim and Off Off) and one for the conditions during the day (Breezeway Motion Daytime). Then I use another program which runs at the crossover time and turns on the outside lights to also enable one program and disable the others. Then I use the program that runs at midnight and one that runs in the morning to change which of those is enabled and disabled. I just found this easier than trying to do it all in one program.

Sunset Actions - [ID 0003][Parent 000D]

If
        Time is Sunset 
 
Then
        Set 'Garage Sconces (SC)' On 20%
        Set 'Breezeway' On 15%
        Set 'Front Sconces (SC Front Dr)' On 20%
        Set 'Rear Sconces (Screen Porch SC' On 20%
        Set 'Front Balcony Sconces' On 20%
        Set 'Rear Balcony Sconces' On 20%
        Set 'Foyer Sconces' On
        Set 'Slat Wall' On 12%
        Wait  5 seconds
        Resource 'Notify Sunset'
        Enable Program 'PreDawn Sconces'
        Enable Program 'PreDawn Slatwall'
        Enable Program 'Breezeway Motion'
        Enable Program 'Breezeway Motion Off Dim'
        Disable Program 'Breezeway Motion Daytime'
 
Else
   - No Actions - (To add one, press 'Action')
 

Posted

Thanks guys. The lights are Philips Hue, so a percentage is settable. @Andy P, it seems like your solution would work best. I'll have to figure out how to configure both programs so they don't interfere or cause one of those infinite loops that I am so prone to create.🤪

Posted
37 minutes ago, gschoffstall said:

Hey gang, I see a way to trigger events based on time, but I don't see a way to set a time window. What am I missing?

 

Change "Time is" to "From"

Posted
1 hour ago, gschoffstall said:

Hey gang, I see a way to trigger events based on time, but I don't see a way to set a time window. What am I missing?

 

To add detail to Javi's comment, here is an example of a program that turns on lights at 6am and then off at 8am:

If
        From     6:00:00AM
        To       8:00:00AM (same day)
 
Then
        Set 'Ambient Lights' On
 
Else
        Set 'Ambient Lights' Off


 

Guest
This topic is now closed to further replies.

×
×
  • Create New...