Commodor47s setup is a lot different than mine.What year is your TM
The green wire goes to any ground. I spliced it into one of the white wires. You probably have a couple of them connected with a wire nut under the sink, just add the green wire to the connection. The brown wire runs from the gas solenoids directly to the module board and shouldn’t connect to the switch panel, hope you can make it out in the pic. There is another small brown wire behind the switch panel that has nothing to do with the WH. It is connected to a green wire with a red wire nut, and goes to a small plug in the circuit board on the switch panel. You should have a red wire supplying power to the switch, it connects to the bottom terminal., the top one connects to the light with a small white wire. A second red wire goes from center terminal of the switch through the junction box, which can be bypassed, to the thermostat and back to the module board. On mine they had a blue wire spliced to the red one and connected it to the switch. I replaced it with a red one as shown in the picture, The blue wire runs from the module board to the light, it passes through the junction box but this too can be bypassed, you can run the blue wire directly from the module board to light. Again on mine they spliced a red wire to the blue one and soldered it to the light but this is where the blue wire goes. One of these days I’ll replace it with a blue one and solder it it to the light. This is assuming that they used all the proper color wires on yours. I about lost it until I figured out they switched wire colors on me. Hope you have better luck. You may need to use an ohm meter to verify where the wires actually go. When you get it all back together and it still doesn’t work you can pull the module board and any RV place can check it for free. At lest around here they do.
Ed
.