Dokumentation
GetValueFormatted
string GetValueFormatted (int $VariablenID)
Parameterliste
| VariablenID | ID der Variable |
Rückgabewert
Wert der angegebenen Variable passend zur Darstellung bzw. zum Profil formatiert
Beschreibung
Die Funktion liefert als Ergebnis den Inhalt der IP-Symcon Variablen mit der ID VariablenID, nachdem er passend zur Darstellung bzw. zum Variablenprofil formatiert wurde. Ist der Variable eine Darstellung zugewiesen, wird diese für die Formatierung verwendet, andernfalls das Variablenprofil. Besitzt die Variable weder Darstellung noch Profil, wird der Wert unformatiert als String geliefert. Der zurückgelieferte Variablentyp ist dabei durch die Formatierung immer String.
Beispiel
echo GetValueFormatted(47788); //Profil = ~Switch
//Ergibt: An oder Aus
echo GetValueFormatted(46250); //Profil = ~Temperature
//Ergibt: 17,5 °C