Documentation
IPS_SetEventScheduleActionEx
Require: IP-Symcon >= 6.0
boolean IPS_SetEventScheduleActionEx (int $EventID, int $ScheduleActionID, string $Name, int $Color, string $ActionID, array $ActionParameters)
Parameters
EventID | ID of the event to be changed |
ScheduleActionID | Unique ID for this schedule action. The ID is used for sorting. IDs only need to be unique for this event. |
Name | Name of the given schedule action |
Color | Color value as HTML color code, e.g., 0x0000FF for blue |
ActionID | ID of the executed action |
ActionParameters | List of Parameters for the executed action |
Returns
If the command succeeds, it returns TRUE, otherwise FALSE.
Description
The command sets the Name, the Color, and the executed Action with the ID ActionID with the parameters ActionParameters for the schedule action with the ID ScheculeActionID of a schedule event with the ID EventID__. If the action executes a PHP Script, the system variable $_IPS['ACTION'] is defined. System Variables can be used during the execution of the script.
If the argument Name is empty, the schedule action with the given ScheduleActionID is deleted. This is only possible if no switch point references that ScheduleActionID.
The special parameters TARGET, ENVIRONMENT, and PARENT are not required here and are handled by the event
The value −2147483648 is no valid action ID.
A maximum of 32 schedule actions can be created for one event.
Example
//Creating schedule actions
IPS_SetEventScheduleActionEx($EreignisID, 0, "Warm", 0xFF0000, "{3644F802-C152-464A-868A-242C2A3DEC5C}", ["VALUE" => 22.5]);
IPS_SetEventScheduleActionEx($EreignisID, 1, "Cold", 0xFF0000, "{3644F802-C152-464A-868A-242C2A3DEC5C}", ["VALUE" => 17]);
IPS_SetEventScheduleActionEx($EreignisID, 2, "Eco", 0xFF0000, "{3644F802-C152-464A-868A-242C2A3DEC5C}", ["VALUE" => 20]);
//Delete schedule action with the ID 2
IPS_SetEventScheduleAction($EreignisID, 2, "", 0, "", []);