« Back to Product

Documentation

IPS_GetVariablePresentation

Require: Symcon >= 8.1

 array IPS_GetVariablePresentation (int $VariableID) 

Parameters

VariableID

ID of the variable whose presentation is to be output

Returns

An array with all parameters of the current variable presentation

Description

The function returns the current presentation of the variable with the ID VariableID. The presentation is available as an array and contains all presentation parameters.

Key Description
PRESENTATION The ID of the presentation used, formatted as a GUID.
Presentation parameters The presentation parameters differ depending on the presentation. The parameters are at the same level as the PRESENTATION parameter

Possible Presentations

Presentation
Enumeration
Date/Time
Duration
Color
Legacy Profile
Shutter
Switch
Slider
Web content
Value display
Value input

Example

print_r(IPS_GetVariablePresentation(12345));
/* Example output
Array
(
    [DIGITS] => 0
    [CUSTOM_GRADIENT] => []
    [ICON] => temperature-half
    [DECIMAL_SEPARATOR] => Client
    [GRADIENT_TYPE] => 1
    [MAX] => 25
    [PRESENTATION] => {6B9CAEEC-5958-C223-30F7-BD36569FC57A}
    [INTERVALS] => []
    [INTERVALS_ACTIVE] => 
    [MIN] => 15
    [PERCENTAGE] => 
    [PREFIX] => 
    [STEP_SIZE] => 1
    [SUFFIX] =>  °C
    [THOUSANDS_SEPARATOR] => 
    [USAGE_TYPE] => 0
)
*/
Any questions?