A detecting method for dairy cattle comprises the steps of: automatically measuring lying and standing times for a milking animal by a sensor; automatically comparing the measured lying and standing times for said milking animal with reference values of lying and standing times; and automatically establishing whether said milking animal is in heat or not based on said comparison. The automatic sensor may also be used for measuring a health parameter of the milking animal.