Tasks

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Tasks

Post by ericvic »

I have a task that I'm trying to create that put the thermostat in setback mode after 10:45 PM and takes it out of setback mode at 6:30 AM. When I created the following task it just keeps turning setback on and off every minute, what am I doing wrong.

Code: Select all

If ('System Time.Time Without Seconds' is Greater Than '10:45:00 pm') Then
    Change 'Stat.Setback' to 'On'
Else If ('System Time.Time Without Seconds' is Greater Than '6:30:00 am') Then
    Change 'Stat.Setback' to 'Off'


I'm sure it is something stupid I'm doing but not sure what.



Thanks,

Eric
ScottBot
Site Admin
Posts: 2806
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Eric,



HouseBot will attempt to execute a Task whenever any of the Properties in its condition lists change. The System Time.Time Without Seconds changes every minute, so the Task is executing at that time. Since you have an If/Else, it will have to do one of the two actions every minute.



To fix this, simply change the condition operator from Greater Than to Equal.
Scott
ericvic
Senior Member
Posts: 144
Joined: Thu Feb 26, 2004 11:06 am
Location: Irondale, AL
Contact:

Post by ericvic »

Scott,



I figured it was something easy like this bit I was too tired last night to think about it too hard :oops:



Thanks,

Eric
Post Reply