« Back to Product

Documentation

RegisterVariableBoolean

Require: IP-Symcon >= 4.0

 int RegisterVariableBoolean (string $Ident, string $Name, array $Presentation, int $Position) 

Parameters

Ident

Ident of the status variable

Name

Name of the status variable

Presentation

The configuration of the presentation as an array. A profile can be set via the Legacy profile.
Default == ""

Position

Position in the object tree and therefore also in the visualization.
Default == 0

Returns

Variable ID of the created status variable

Description

This function creates a status variable of type Boolean with the ident Ident and the name Name. You can also specify which Presentation is to be used and on which Position the status variable is to be placed.

The structure of the presentation is described in more detail here.

Warning

Representations can be used from version 8.0. In previous versions, profiles can be set as a string via the Presentation parameter

Example

$variableID = $this->RegisterVariableBoolean("Switch", "Living room light switch");

$this->RegisterVariableBoolean("Switch", "Light Switch", ["PRESENTATION" => VARIABLE_PRESENTATION_SWITCH]);
Any questions?