Jump to content

Condition for elapsed status time


belias

Recommended Posts

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

Link to comment
  • 3 months later...
  • 3 months later...

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?

Link to comment

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 - 

Link to comment

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.

Link to comment
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.

Link to comment

Archived

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


×
×
  • Create New...