I would recommend starting with CoRE. You can create a simple piston with conditions. “if main lights on, then turn off cabinet lights”.