Speciation is facilitated when traits under divergent selection also act as mating cues. Fluctuations in sensory conditions can alter signal perception independently of adaptation to the broader sensory environment, but how this fine-scale variation may constrain or promote behavioural isolation has received little attention. The warning patterns of Heliconius butterflies are under selection for aposematism and act as mating cues. Using computer vision, we extracted behavioural data from 1481 h of video footage, for 387 individuals. We show that the putative hybrid species H. heurippa and its close relative H. timareta linaresi differ in their response to divergent warning patterns, but that these differences are strengthened with increased local illuminance. Trials with live individuals reveal low-level assortative mating that is sufficiently explained by differences in visual attraction. Finally, results from hybrid butterflies are consistent with linkage between a major warning pattern gene and the corresponding behaviour, though the differences in behaviour we observe are unlikely to cause rapid reproductive isolation as predicted under a model of hybrid trait speciation. Overall, our results reveal that the contribution of ecological mating cues to reproductive isolation may depend on the immediate sensory conditions during which they are displayed to conspecifics.