PDA

View Full Version : use lua to change device manager status



yonu
June 9th, 2013, 09:22 PM
Is there away to use lua to change that status of an device without triggering the switch for the device?

yonu
June 12th, 2013, 11:46 PM
as best I can tell I have found a way to do what i needed I found the code in the snippet section to control a light with lua so i changed this section from

local controlid = 'Switch'
local control = device:GetControl (controlid)
if control then
print ('Shutoff Workroom Light')
control:SetValue ("Off")
end

to

local controlid = 'Switch'
local control = device:GetControl (controlid)
if control then
print ('Shutoff Workroom Light')
control:UpdateValue("Off")
end


thanks again,
Yonu