Requires: IP-Symcon >= 5.5
string GetValueFormattedEx (integer $VariableID, variant $value)
VariableID | ID of the variable |
value | Value to be formatted |
Value formatted to match the profile of the variable |
The function returns the content value Value after it has been formatted to match the variable profile of the variable with the ID VariableID. The actual value of the variable with the ID VariableID is irrelevant. Due to the formatting the variable type returned is always a string.
echo GetValueFormatted(12345, true); //Profil = ~Switch //Results in: On echo GetValueFormatted(23456, 17.5); //Profile = ~ Temperature //Results in: 17.5 ° C