Require: IP-Symcon >= 4.4
boolean IPS_SetEventConditionTimeRule (int $EventID, int $ConditionID, int $RuleID, int $Hour, int $Minute, int $Second)
ID of the event to be changed
ID of the condition that contains the rule
Unique ID for this group. IDs need to be unique for this condition only.
Hour value (0..23) with which the current time is compared
Minute value (0..59) with which the current time is compared
Second value (0..59) with which the current time is compared
If the command succeeds, it returns TRUE, otherwise FALSE.
This function modifies the rule with the ID RuleID of the condition with the ID ConditionID of the event with the ID EventID. The rule compares the current time with the Hours, Minutes and Seconds, according to the comparison operation Comparison. If there is no rule with the ID RuleID, one will be created.
If one of the values Hour, Minute or Second < 0, the rule with the ID RuleID will be deleted.
Which rule ID contains which rule can be looked up via IPS_GetEvent.
// Create a root condition IPS_SetEventCondition(12345, 0, 0, 0); // Adds/modifies the rule with the ID 2 for the event with the object ID 12345 // It has to be exactly 10:30 p.m. for this rule to be met. IPS_SetEventConditionTimeRule(12345, 0, 2, 1, 22, 30, 0); // Delete the rule with ID 1 IPS_SetEventConditionTimeRule(12345, 0, 1, 0, -1, 0, 0);