Question on Sunset/Light Example
Posted: Fri Jul 25, 2008 9:20 pm
I implemented the sunset light example you created a tutorial for. It works fine. I did notice one odd thing when I looked at the log today. The controller sent an "off" command to the light every second during the minute it was suppose to turn off. Interestingly other switches I control with a slightly different task only send the command once during that minute when I used the setting Time without seconds.
Here is the task code:
If ('System Time.TimeAndDate' is Equal to '7/24/2008 8:48:00pm') Then
Change 'LivingRoomLight.Power State' to 'On'
Else If('System Time. Time Without Seconds' is Equal to '12:15am') Then
Change 'LivingRoomLight.Power State' to 'Off'
The first time being actually the system variable for sunset. This is the only place I have used the else if. Not sure if mixing the .TimeAndDate and .Time Without Seconds in the same "if /else if" clause is what is causing the else if to be triggered 60 times or not.
Steve
Here is the task code:
If ('System Time.TimeAndDate' is Equal to '7/24/2008 8:48:00pm') Then
Change 'LivingRoomLight.Power State' to 'On'
Else If('System Time. Time Without Seconds' is Equal to '12:15am') Then
Change 'LivingRoomLight.Power State' to 'Off'
The first time being actually the system variable for sunset. This is the only place I have used the else if. Not sure if mixing the .TimeAndDate and .Time Without Seconds in the same "if /else if" clause is what is causing the else if to be triggered 60 times or not.
Steve