Ad Widget

Collapse

Trigger when value is unchanged for 15 minutes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • moddeydhoo
    Junior Member
    • Apr 2020
    • 2

    #1

    Trigger when value is unchanged for 15 minutes

    Hi guys,

    As the title suggests, I'm trying to create a trigger for a value that has remained unchanged for a period of time. Normal behavior for this value is to fluctuate up/down throughout the course of the day, thus 15 minutes of no change would be a cause for concern.

    To no avail, I have searched for similar questions and bastardized my own expressions using the triggers documentation... queue the "I'm fairly new to..." line

    Thank you in advance.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    My first thought was to use a calculated item based on something like max - min, but I actually don't think that's needed, since the trigger functions include a delta() function that appears to do exactly what you need. If the .delta(15m) == 0 (for integer item values) then your item hasn't changed in 15 minutes.

    If your item is returning floating point values, you probably can't look for a delta of 0, since there might be very slight differences in the floats, so you would use .delta(15m) < some_small_float_number_here

    Comment

    • moddeydhoo
      Junior Member
      • Apr 2020
      • 2

      #3
      Tim, Thank you very much, the delta function has worked a treat!

      Comment

      Working...