Jump to content

Sunset if/then help


chevykid

Recommended Posts

Posted

here is what i got:

If 

       Time is Sunset  -  1 hour  and 15 minutes

Then

        Set 'BEDRM LAMP' 20%

        Set 'BDRM BACK' 12%

        Wait  30 minutes 

        Set 'BDRM.Back Porch Light' On

this program has been running great, what I would like to add is if 'BDRM BACK' is already on, to leave it at the present level and not change it to the 12% setting.

 

thanks!

Posted (edited)
2 hours ago, chevykid said:

I would like to add is if 'BDRM BACK' is already on, to leave it at the present level

Create a second program, I'll call it "Set_BDRM_BACK_To_12":

Set_BDRM_BACK_To_12 - [ID xxxx][Parent xxxx][Not Enabled]

If
        'BDRM BACK' Status is Off
 
Then
        Set 'BDRM BACK' On 12%
 
Else
   - No Actions - (To add one, press 'Action')

After creating this program, right-click on it and choose "Disable".  This is important because it tells the ISY not to automatically evaluate the IF whenever the status of "BDRM BACK" changes.  If you don't do this, then whenever you turn OFF "BDRM BACK" it will automatically come back on at 12%.

Now replace the "Set 'BDRM BACK' 12%" line in your program with "Run Program 'Set_BDRM_BACK_To_12' (IF)".

Edited by kclenden
  • Like 2
Posted
2 hours ago, chevykid said:

so when you disable a program it's not totally disabled.

thanks i'll see if it works today.

The program is disabled in the sense it will not run by its own if statement but can still be called by another program.

  • Like 1
Posted
13 hours ago, chevykid said:

so when you disable a program it's not totally disabled.

thanks i'll see if it works today.

It only disables the triggers of the program.

  • 3 weeks later...
Posted

 

So this is what I had to do, I had to 'run' 2 times with a "Wait 1 minutes" in between, for it to work, it was intermittent otherwise.

 

If 

       Time is Sunset  -  1 hour  and 15 minutes

Then

        Set 'BEDRM LAMP' 20%

        Run Program 'Set_BDRM_BACK12' (If)

        Wait  1 minutes 

        Run Program 'Set_BDRM_BACK12' (If)

        Wait  30 minutes 

        Set 'BDRM.Back Porch Light' On

 

Thanks!

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...