« Back to Product

Documentation

IPS_SetVariableProfileAssociation

 bool IPS_SetVariableProfileAssociation (string $ProfileName, mixed $Value, string $Name, string $Icon, int $Color) 

Parameters

ProfileName

Name of the profile. Available profiles can be queried via IPS_GetVariableProfileList

Value

The value that should be associated with the name, icon, and color

Name

Name of the specified value

Icon

Icon of the specified value

Color

Color value in HTML format, e.g., 0x0000FF for blue. Special case: -1 (COLOR_TRANSPARENT) for transparent

Returns

If the function succeeds, it returns TRUE, otherwise FALSE.

Description

This function sets the Name, the Icon, and the Color for the value Value of the variable profile with the name ProfileName. The color is not displayed for profiles of type value display/slider (see Object presentation).

Warning

If Name and Icon are empty, the association for the specified value Value is deleted. Associations of Boolean profiles cannot be deleted.

Warning

Standard profiles, which cannot be changed, start with a tilde (~).

Example

//Create an association for value 1 in white
IPS_SetVariableProfileAssociation("Temperature", 1, "Value 1", "Speaker", 0xFFFFFF);

//Create an association for value "sum" in yellow
IPS_SetVariableProfileAssociation("Season", "sum", "Summer", "Sun", 0xFFFF00);

//Delete the association for value 1
IPS_SetVariableProfileAssociation("Temperature", 1, "", "", COLOR_TRANSPARENT);
Any questions?