Like a moth into the flame-phototaxis is an iconic example for innate preferences. Such preferences probably reflect evolutionary adaptations to predictable situations and have traditionally been conceptualized as hardwired stimulus-response links. Perhaps for that reason, the century-old discovery of flexibility in Drosophila phototaxis has received little attention. Here, we report that across several different behavioural tests, light/dark preference tested in walking is dependent on various aspects of flight. If we temporarily compromise flying ability, walking photopreference reverses concomitantly. Neuronal activity in circuits expressing dopamine and octopamine, respectively, plays a differential role in photopreference, suggesting a potential involvement of these biogenic amines in this case of behavioural flexibility. We conclude that flies monitor their ability to fly, and that flying ability exerts a fundamental effect on action selection in Drosophila. This work suggests that even behaviours which appear simple and hard-wired comprise a value-driven decision-making stage, negotiating the external situation with the animal's internal state, before an action is selected.