Temperature from one hour ago

Yes.

Can you provide an example data structure that shows what you want? Something like this?

{
  0: [0, 0, 0, ..., 0, 0],
  1: [0, 0, 0, ..., 0, 0],
  ...
  12: [178, 214, 199, ..., 542, 335],
  ...
  23: [0, 0, 0, ..., 0, 0]
}

If so, is history[0][0] the most recent midnight reading, or the oldest?

Please don’t do that. Whilst AI has its place, its use in HA is strongly discouraged as it has learned from old data and forum posts. Much of what it writes relating to HA is simply wrong, and it takes us longer to fix it up than to solve the original problem. [example][example]