ph_getinsteonlevel PowerHome formula function
Description
Retrieves the current level (dim / bright) value of the specifed Insteon ID.
Syntax
ph_getinsteonlevel ( id )
Argument |
Description |
id |
String representing the ID of the Insteon Device from which you wish to retrieve the level. |
Return value
Double. Returns the level associated with the specified Insteon Device ID that PowerHome currently has stored. This value will be from 0 to 255 corresponding with actual Insteon levels. To convert to a 0 to 100% range, use the following formula: X * 100 / 255 where X is the current level from 0 to 255.
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_getinsteonlevel ("SOFA LITE ")
• ph_getinsteonlevel ("[TEMP1]")
• ph_getinsteonlevel("[LOCAL1]")/255*100,0)