In flies, behavioural responses to different salt concentrations are mediated by gustatory receptor neurons (GRNs). Low salt concentrations, which are beneficial for the animal, elicit attractive responses, whereas harmful high salt concentrations trigger aversive responses. Montell and colleagues now show that the Ionotropic glutamate receptor 76b (Ir76b) functions as a low-salt sensor. Loss of Ir76b selectively impaired the attraction to low salt concentrations. These findings support a model in which competition between low-salt sensing GRNs and high-salt sensing GRNs accounts for the opposing behavioural responses.