Disclosed is a method of detecting a condition of a non-human animal and treating the animal accordingly. The method includes the steps of measuring a temperature of the animal (2, 3) during milking and using the temperature measurement to determine a condition of the animal (6). In response to the determined condition, treatment is administered to the animal (7) while it is being milked by way of an automated treatment delivery device. Also disclosed is an apparatus and computer program for performing the method.