Documentation
IPS_SetEventScheduleGroupPoint
Require: Symcon >= 3.2
bool IPS_SetEventScheduleGroupPoint (int $EventID, int $GroupID, int $PointID, int $StartHour, int $StartMinute, int $StartSecond, int $ActionID)
Parameters
| EventID | ID of the event to be changed |
| GroupID | ID of the group the switch point belongs to. The group must already exist. |
| PointID | Unique ID for this switch point. IDs only need to be unique for this group. |
| StartHour | Start hour (0..23) |
| StartMinute | Start minute (0..59) |
| StartSecond | Start second (0..59) |
| ActionID | ID of the schedule action which should be executed at the start time. The ID needs to be valid. |
Returns
If the function succeeds, it returns TRUE, otherwise FALSE.
Description
This function sets the switch point with the start time according to StartHour, StartMinute, and StartSecond and the ID PointID to the group with the ID GroupID of a schedule event with the ID EventID.
If StartHour, StartMinute, or StartSecond are outside of the valid range (StartHour < 0 or > 23, StartMinute < 0 or > 59, StartSecond < 0 or > 59, e.g., -1), the switch point with the given PointID is deleted. If no switch point with this ID exists, an error is raised.
Within a group, only a single switch point may have the same combination of StartHour, StartMinute, and StartSecond.
Example
//Create switch points for the group with ID 0 (= Mo - Fr)
IPS_SetEventScheduleGroupPoint($EventID, 0, 0, 8, 0, 0, 1); //Call action with ID 1 (=Warm) at 8:00:00
IPS_SetEventScheduleGroupPoint($EventID, 0, 1, 22, 30, 0, 3); //Call action with ID 3 (=Eco) at 22:30:00
//Delete switch point with ID 1 from group with ID 0 (= Mo - Fr)
IPS_SetEventScheduleGroupPoint($EventID, 0, 1, -1, -1, -1, 1);