Documentation
IPS_SetVariableProfileAssociation
boolean IPS_SetVariableProfileAssociation (string $ProfileName, variant $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 to 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 for transparent |
Returns
If the command succeeds, it returns TRUE, otherwise FALSE.
Description
This function sets the Name, the Icon, and the Color profile for the value Value of the variable profile with the name ProfileName. The color is not displayed for profiles of type display/ slider. (See: (link: en/service/documentation/components/visualizations/object-presentation/ text: Object presentation ))
If Name and Icon are empty, the association to the specified value Value is deleted.
The maximum number of simultaneous associations per profile is 128.
Standard profiles cannot be changed. These profiles names begin with a tilde (~).
Example
//Creating the value 1 in the white color
IPS_SetVariableProfileAssociation("Temperature", 1, "Value 1", "Speaker", 0xFFFFFF);
//Create Value for "sum" in the yellow color
IPS_SetVariableProfileAssociation("Season", "sum", "Summer", "Sun", 0xFFFF00);
//Delete value 1
IPS_SetVariableProfileAssociation("Temperature", 1, "", "", -1);