ph_setzwavedisplay PowerHome formula function
Description
Sets the internally stored
display values (foreground color, background color, and graphic) for
a Z-Wave device
Syntax
ph_setzwavedisplay ( al_foreground, al_background, as_graphic, ai_refresh)
ph_setzwavedisplay ( as_id, al_foreground, al_background, as_graphic, ai_refresh )
Argument | Description |
as_id | String (Optional). The ID of the Z-Wave device. If this
parameter is not supplied, the System variable ZWAVE will be used for the ID |
al_foreground | Long. The foreground color you would like to
be set. Use -1 to not update the foreground color |
al_background | Long. The background color you would like to
be set. Use -1 to not update the background color |
as_graphic | String. The graphic file (full path and
filename) that you would like to be associated with the device status. Use
a single space " " if you don't wish to update the graphic |
ai_refresh | Integer. Specifies whether the Device Status
screen should be refreshed or not. A value of 0 will not refresh the
Device Status screen. Any other value will force a refresh |
Return value
Integer. Returns 0 if successful.
Returns 1 if the ID does not exist. Returns 2 if an error occurs during update
Usage
Use this function to manually update
the Device Status colors and graphic associated with a
Z-Wave device
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_setzwavedisplay("KITCHENLIGHT",0,rgb(255,255,0),"c:\powerhome\web\graphics\on.jpg",1)
- Returns 0 if successful. For the KITCHENLIGHT Z-Wave device, sets the
foreground color to black, the background color to yellow, and sets the
graphic file to c:\powerhome\web\graphics\on.jpg. The Device Status screen is
refreshed to immediately show the
changes