|
Parameter |
Type |
Description |
|
device |
string |
Device house code and unit code such as "A1" |
|
graphics |
string |
A series of device values and graphic file references to be associated with the device. |
|
Return value |
Type |
Description |
|
(none) |
|
|
This command adds device value graphical representations to a device.
The graphics string is a series of values
and graphic file references. The
graphic file is displayed on the HomeSeer HTML user interface instead
of the HomeSeer default
image automatically depending
on the device value. Now,
your device status can have graphical representations without having to
code scripts to include HTML in the device status string value.
The graphics string definition is made up of a graphic file name, then the unprintable chr(2) character, then a string representation of the value associated with that graphic, then the unprintable chr(1) character separating that set from the next one. At the end of the string definition, do not include any chr(1) characters at the end.
Example:
hs.DeviceValuesGraphicsAdd "z6",
"myon.gif" & chr(2) & "100" & chr(1) &
_
"mydim.gif"
& chr(2) & "50" & chr(1) & _
"myoff.gif"
& chr(2) & "0"
Note: Values between 0 and 50 as well as between 50 and 100 are undefined. All values must be specified. The values are not limited to being between 0 and 100 - a device's value is a long integer variable type.
See Also