This function creates a new device and sets its name property to the specified name. The house code and unit code of the device are set to A1. The returned object is a reference to the new device object. See the DeviceClass for a list of the properties available.
Parameter: name
Type: string
Description: This is the name of the new device.
Return value: reference
to DeviceClass
Type: object
Description: This returns a reference to the actual DeviceClass
object. This
allows direct access to all the properties of a device.
sub main()
dim dv
set dv = hs.NewDeviceEx("my
device")
dv.location = "living room"
end sub