I would like to fetch the maximum and minimum state since midnight of a temperature sensor. How do I do that?