CombineFrames

Combines different sets of timeframes to delete or add them together.

Parameters

NameDefaultMeaning
withThe name added to a previous call to timeframes
methodEither AND, OR or NOT

Description

This combines time-frames in various ways.

When you call timeframes, you can store the result in a variable instead of them replacing the current table of timeframes.

Then with this layer, you can combine them together.

In a AND combination, only the times that are common to both sets of timeframes are kept. In an OR combination, times when either time frames were active. And the NOT combination removes cuts out any times from the 'with' timeframe.

Example

Let's say you have the following rule…

{
   "type": "timeframe",
   "condition": "{Running} > 0",   
}

This gets a list of the times when the machine has been running.

Next, we get a list of all of the scheduled downtimes (the times where the system is expected to stop)

{
   "type": "get_events",
   "source": "Downtime",
   "variable": "downtime"
}

You can then subtract the downtimes from our running times with the following layer…

{
   "type": "combineframes",
   "with": "downtime",
   "method": "not"
}

This will result in a list of running times that do not include any down-times.