Condition Function

There are two key functions when you want to create a triggered event. The condition function and the trigger function.

The trigger function is the function that gets called when your condition function changes state (such as going from 'False' to 'True'),

For example, if you wanted to send an SMS to someone when the outside temperature was greater than 40 degrees, the Trigger Function would send the SMS, while the Condition Function would check the temperature.

Both the trigger and condition functions are passed a single parameter - a Trigger object.