Controlling my wired lights with relay board

Hello Michael, welcome to the forums. Please post the yaml configuration of your automation so we can assist you. It should be correctly formatted. See point 11 here.