Jump to content

Condition for elapsed status time


belias

Recommended Posts

Posted

As a future request...it would be great if there were a simple way to enter a condition for the amount of time a device has been at a particular status. Maybe an example is easier:

 

If:  Garage door has been open for 15 minutes

Then:  Perform these actions

 

 

I can do this now, but it requires a separate flag program and a wait timer.

 

If there's a simpler way and I'm missing it - that would be great too!

 

 

Thanks!

 

-Brian

  • 3 months later...
Posted

It's a good idea. At this time there is no if argument that checks for a status long after the original event has triggered feature. The only option is the flag and delayed event check concept at this point. I think this is a good one to put on the feature list.

Posted

Hi Brian,

 

May I ask why you need a separate program? You can simply have a wait in part of the action and if the device status changes, the wait is interrupted and the rest of the actions are not run.

 

With kind regards,

Michel

  • 3 months later...
Posted

Along these lines of acting after a "wait" period, how would I go about programming an action if a device is STILL in that status after a given amount of time?

 

To clarify, I'd like a notification sent if my garage is still open after 30 minutes. Using the example above, wouldn't it still notify me after 30 minutes, regardless of the status at the 30-minute point? In other words, I'd like the status of ON to trigger the notification ONLY if that status does not change for 30 minutes. Any ideas how I can accomplish this?

Posted

Would this work? (FYI, a Sensor OFF status means my door is open.)

 

GarageState:

If
       Control 'Garage Door - Sensor' is switched Off
Then
       Wait 30 minutes
       Run Program 'GarageState' (Else)
Else
       - Nothing - 

 

30MinOpenNotify

If
       Control 'Garage Door - Sensor' is switched Off
   And Program 'GarageState' is True
Then
       Notify
Else
       - Nothing - 

Posted

I believe Mark's script will work fine.

 

If 
       Status 'Garage Door' is On 

Then 
       Wait  30 minutes 
       Send Notification

 

As long as the status of your garage door is On the clock is ticking. If the status changes to Off the timer stops and the program turns false with no notification.

Posted
I believe Mark's script will work fine.

 

Code:

If

Status 'Garage Door' is On

 

Then

Wait 30 minutes

Send Notification

 

 

As long as the status of your garage door is On the clock is ticking. If the status changes to Off the timer stops and the program turns false with no notification.

 

Yet another example of a capability that would be lost if wait states were not interrupted by changes of conditions.

Archived

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

×
×
  • Create New...