return { on = { devices = {'PIR Hol'} }, logging = { level = domoticz.LOG_DEBUG, marker = 'PIR Hol', }, execute = function(domoticz, device) --local variables local PIR = domoticz.devices('PIR Hol') local Lampa = domoticz.devices('WiatroĊ‚ap') --local Movment = domoticz.devices('Wykrywanie Ruchu') local LightingTime = 1 if (Lampa.state == 'On') then Lampa.switchOff().afterMin(LightingTime) else Lampa.switchOn().forMin(LightingTime) end end }