IsOn

Purpose

This function checks the status of a device.

Parameters

Parameter: device
Type: string
Description: This is the house code and unit code or device code of the device, such as "A1" or "q17".

Returns

Return value: status
Type: boolean
Description: This returns TRUE if the device is on or dimmed or FALSE if the device is off.

Example

sub main()

if hs.IsOn("A1") then
 
hs.speak "the light is on"
end if

end sub