Documentation
Enumeration
Require: Symcon >= 8.0
Parameter
Information on the visual properties and meanings of the parameters can be found in the Object Presentation.
| Name | Type | Parameter | Description |
|---|---|---|---|
| PRESENTATION | String | The ID of the presentation | VARIABLE_PRESENTATION_ENUMERATION {52D9E126-D7D2-2CBB-5E62-4CF7BA7C5D82} |
| ICON | String | Default Icon | Icons |
| OPTIONS | String | Options | JSON-encoded list of objects, the exact parameters are described under Options |
| LAYOUT | Integer | Layout | 0: Column, 1: Row, 2: Grid |
| DISPLAY | Integer | Display... | 0: Caption, 1: Icon, 2: Caption and Icon |
Optionen
| Name | Type | Parameter | Description |
|---|---|---|---|
| Value | Boolean/String/Integer/Float | Value | Depends on the type of the variable |
| Caption | String | Caption | |
| IconActive | Boolean | Overwrite Icon | |
| IconValue | String | Icon | Icons |
| Color | Integer | Color |
Beispiele
// When registering a variable for PHP modules
// Only icons are displayed. One option is highlighted in color.
$this->RegisterVariableInteger('Modus', 'Modus', [
'PRESENTATION' => VARIABLE_PRESENTATION_ENUMERATION,
'DISPLAY' => 1 /* Icon */,
'OPTIONS' => json_encode([
['Value' => 1, 'Caption' => 'Automatic', 'IconActive' => true, 'IconValue' => 'circle-a'],
['Value' => 2, 'Caption' => 'Eco', 'IconActive' => true, 'IconValue' => 'circle-e', 'Color' => 40448],
['Value' => 3, 'Caption' => 'Manual', 'IconActive' => true, 'IconValue' => 'circle-m'],
])
]);
// For existing variables via script
// Only icons are displayed. One option is highlighted in color.
IPS_SetVariableCustomPresentation(12345, [
'PRESENTATION' => VARIABLE_PRESENTATION_ENUMERATION,
'DISPLAY' => 1 /* Icon */,
'OPTIONS' => json_encode([
['Value' => 1, 'Caption' => 'Automatic', 'IconActive' => true, 'IconValue' => 'circle-a'],
['Value' => 2, 'Caption' => 'Eco', 'IconActive' => true, 'IconValue' => 'circle-e', 'Color' => 40448],
['Value' => 3, 'Caption' => 'Manual', 'IconActive' => true, 'IconValue' => 'circle-m'],
])
]);