Producing a sensor report for a given time interval

I want to be able to produce records that confirm my milk pasteurizer is maintaining the proper temperature for the proper duration. What I’d like to be able to do is:

  • start the pasteurizer (manually)
  • tell HA to start watching the temperature sensor
  • have HA note when the temperature reaches a set point
  • have HA note when the temperature has remained above the point for a given period
  • produce some sort of report of the temperature readings during the pasteurization period

I’ve been exploring HA, and think this can be done by creating a sensor that changes state to indicate the beginning and ending of the period I’m interested in, then do a database query to retrieve the sensor readings (and timestamps) during that interval, and save them to a file somewhere.

I’ve searched for any mention of someone doing anything similar, without luck.

Do this sound like a workable approach?

Is there a similar project I can use for reference?

Hello Mike,

HA Automations can easily do all that. That is not a question.

My question would be if you are using this to create food for someone other than your family, there would need to be a lot of validation and regulation to prove that it is safe. The HA open source license would not cover such a use, that would be on you. So safety wise in the eyes of the govt, IE selling the product produced or whatever, that is a bit foggy. HA has frequent (at minimum monthly) updates that could easily affect your local automations,so you may need to lock in to a version and re-validate when you flip version kind of thing. It starts to get kinda complicated.

That would be something to take up with the local regulators, if that becomes relevant. That aside, can you offer any advice on what I want to do?