Involved in the transmission of sensory signals from the chemoreceptors to the flagellar motors. Phosphorylated CheY interacts with the flagella switch components FliM and FliY, which causes counterclockwise rotation of the flagella, resulting in smooth swimming. Binds 1 Mg(2+) ion per subunit. Phosphorylated CheY binds to FliM and FliY. Phosphorylated by CheA. Dephosphorylated (inactivated) by FliY and CheC. The signaling mechanism of chemotaxis in B.subtilis appears to be inverted in comparison to E.coli.