Jump to content

True/False Question


aLf

Recommended Posts

I have the following program;

 

If

(

From Sunset

To Sunrise (next day)

)

And Control 'Garage Lantern S' is switched Fast On

 

Then

Set 'Garage Lantern S' On

Set 'Garage Lantern W' On

Wait 2 seconds

Set 'Driveway Septic' On

Wait 2 seconds

Set 'Woodshed' On

Set 'South Entry Lantern' On

 

Else

- No Actions - (To add one, press 'Action')

I would expect it to show FALSE and it does until I use it, then turns TRUE. After I return the switches to OFF, it still shows TRUE!

 

Here is the normal way to turn it off;

 

If

(

Control 'Garage Lantern S' is switched Off

Or Control 'Garage Lantern S' is switched Fast Off

)

 

Then

Set 'Garage Lantern S' Off

Set 'Garage Lantern W' Off

Wait 2 seconds

Set 'Driveway Septic' Off

Wait 2 seconds

Set 'Woodshed' Off

Wait 2 seconds

Set 'South Entry Lantern' Off

 

Else

- No Actions - (To add one, press 'Action')

For you Guru's, I use this to turn on several lights on the driveway at once rather than having to go around to 4 seperate switches.

 

Any help, suggestions or a better way to do would be appreciated.

 

Thanks,

 

aLf

Link to comment

Not sure I quite understand, but the initial program will change to true if, during the specified time periods, the 'Garage Lantern S' switch is turned FAST ON (double-tap ON).

 

When do you want it to go false, when you turn the 'Garage Lantern S' switch off? If so, you could try changing the IF statement to:

 

If 
( 
From Sunset 
To Sunrise (next day) 
) 
And Control 'Garage Lantern S' is switched Fast On 
And Control 'Garage Lantern S' is not switched Off

Link to comment

Yes, it will be True all day but will not be triggered until one of the other conditions is met because of using Ands. Each change in condition will cause a reevaluation. At that time it will run the Then or Else and stay True or change False.

 

Rand

Link to comment

Is this the code you are referring to?

 

If
(
From Sunset
To Sunrise (next day)
)
And Control 'Garage Lantern S' is switched Fast On
And Control 'Garage Lantern S' is not switched Off 

 

 

Yes, it will be True all day but will not be triggered until one of the other conditions is met because of using Ands. Each change in condition will cause a reevaluation. At that time it will run the Then or Else and stay True or change False.

 

During the time that the Schedule is True:

 

When 'And Control 'Garage Lantern S' is switched Fast On ' the program will trigger True and run the Then Actions.

 

When 'And Control 'Garage Lantern S' is not switched Off' will interrupt the program when that switch is pressed off and will run the Else.

 

Rand

Link to comment

aLf,

 

Add the Sunset/Sunrise condition to program 2 if you need the program to change to False during the day.

 

If
       From    Sunset 
       To      Sunrise (next day)
   And (
            Control 'Garage Lantern S' is switched Off
         Or Control 'Garage Lantern S' is switched Fast Off
       )

 

Rand

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...