a, Pimentel et al.1 report that, during sleep, neurons in the brain's dorsal fan-shaped body (dFB) in flies are in an ON state. An unidentified potassium-channel protein is closed, so potassium ions remain in the cell, and the dopamine receptor protein Dop1R2 is inactive. In this state, dFB neurons show repetitive bursts of activity known as spiking (displayed as peaks in a graph of electrical activity). b, After transient dopamine release from wake-promoting neurons (not shown), the neurotransmitter molecule binds to and activates Dop1R2, triggering signalling through the protein Gi/o. This in turn opens and causes potassium efflux through the channel protein, producing a current across the cell membrane that acutely inhibits spiking. Animals rapidly awaken while neurons remain in the ON state. c, Prolonged exposure to dopamine triggers an OFF state, in which the activity of two other potassium channels is modulated. One channel, Shaker, is inhibited (not shown), and another channel protein, Sandman, moves from vesicles in the cytoplasm to the membrane. Potassium efflux through Sandman then chronically inhibits neuronal firing.