This function checks the status of a device.
Parameter: device
Type: string
Description: This is the house code and unit code or device code of the
device, such as "A1" or "q17".
Return value: status
Type: boolean
Description: This returns TRUE if the device is on or dimmed or FALSE if
the device is off.
sub main()
if hs.IsOn("A1")
then
hs.speak
"the light is on"
end if
end sub