diff --git a/light-server.lua b/light-server.lua index fea3067..2c8e83e 100644 --- a/light-server.lua +++ b/light-server.lua @@ -99,7 +99,7 @@ local function mainLoop() if typeOfRoom == 'main' then applyMainCommand(mainOutput, lightIsOn) elseif typeOfRoom == 'secondary' then - applySecondaryCommand(mainOutput, lightIsOn) + applySecondaryCommand(secondaryOutput, lightIsOn) else error('unknown type of room "' .. tostring(typeOfRoom) .. '"', 0) end