By guess would be that the power is just for the lamp and the yellow is a switched connection to ground and the fix would be to ground the yellow wire.
If you have the gauge\float out, ohm it out with a multimeter moving the float up and down and see how the yellow wire interacts with either hot or ground. That or look at the wiring diagram...
"enjoy every sandwich" - W Zevon
2001 FLHR (carb) w 95" 26g cam and a head job.