yonu
June 18th, 2013, 01:31 PM
ok I have managed to create a device in the lighting lua to produce what I needed in however I need on thing different and i cant seem to get it to work the button is currently labed button I need it to show a status such as open or closed however I can see it get it to do it everytime I replace the Name = 'Button', with a variable I get a lua error I am hoping there is something I am missing here is the full code
--[[
push Device Class
--]]
local Push = Switch:New ( {
Type = 'Switch\\Push',
AddControls = function (self)
local control = DeviceManager.Controls.Classes.PushButton: New ( {ID = 'Switch',Name = 'Button',Device = self, Command = self.Command} )
-- self:AddControl (control)
self:AddControl (control)
control:UpdateValue("Idle")
end,
} )
Thanks,
Yonu
--[[
push Device Class
--]]
local Push = Switch:New ( {
Type = 'Switch\\Push',
AddControls = function (self)
local control = DeviceManager.Controls.Classes.PushButton: New ( {ID = 'Switch',Name = 'Button',Device = self, Command = self.Command} )
-- self:AddControl (control)
self:AddControl (control)
control:UpdateValue("Idle")
end,
} )
Thanks,
Yonu