I was wondering if anyone has ever set up something like this. What I would like to have is an remote temperature sensor that logs the temperature and maybe even humidity. Then when an internet connection is available (like me turning on my hotspot), upload this data (current and historic) to HA.
I have an ESP8266 and some ds18b20 laying around, but I do not have an idea how to send the historic data to HA when internet is available.
The question is really what your situation is.
If the remote device can be on a constant power source, then the amount of ram to store the data is the real limit.
If it is battery powered, then pseudo static ram will eat more battery and a regular check on internet connection will really drain, so you will have to really add some battery cells to it, like a really big power bank or an UPS battery.
I am not sure if ESPhome can store data like this in its current version, but it is definately possible if you program it yourself.