The CDI is looking for a ground from either of the thermoswitches. Telling the CDI that the switches have closed due to an excessive temperature.
The warning horn is powered via the yellow wire from the key switch being on. The warning horn is grounded to make the buzzer sound.
Have you...