TRP gating is linked to the metabolic state and maintenance of the Drosophila photoreceptor cells.