return { on = { devices = {'Przycisk'} }, logging = { level = domoticz.LOG_DEBUG, marker = 'Przycisk', }, execute = function(domoticz, device) local lamp1 = domoticz.devices('Lampa') if (device.state == 'On' ) then if (lamp1.state == 'Off') then lamp1.switchOn() elseif (lamp1.state == 'On') then lamp1.switchOff() end end end }