The present study reports new knowledge into the biological rhythms of subtidal bivalves using the fan mussel Pinna nobilis as model. The objective was determining which factor(s) provoke the change between two different patterns observed in the annual cycle of this species: P1, characterized by the individuals opening and closing their valves following the presence and absence of ambient light and P2, characterised by a behaviour independent of the presence of light. Magnetoresistive sensors were installed on 8 fan mussels to record gaping activity in laboratory conditions. Different temperature and light treatments were applied. Results showed temperature as the factor modulating the change between behavioural patterns. The individuals switched to P1 when temperature reached 24.5º C. In this pattern, individuals are entrained by light showing a circadian rhythm linked to the daily light treatments. During P2, the circadian rhythm was missing or very weak, contrary to in situ observations. The results of the present study contribute to understand the biology of the species in order to plan new conservation strategies. Furthermore, the observed relationship between temperature and P1 is of interest to develop captive breeding of fan mussels. Altogether, this information is especially relevant in view of the recent mass mortality of P. nobilis occurred in the western Mediterranean.