Thanks for the sample snippets.
Could you please provide an usecase and a possible rule or action request?
The use case is a terrarium control system which simulates the habitat of a reptile with respect to daylight, temperature, and humidity. The idea is to take the actual temperature of the natural habitat (Vietnam) into account rather than using climate tables with average temperatures. As Vietnam is 7 hours behind UTC, it is required to access the history data as the daylight cycle for is shifted to our local time.
An action to fetch the temperature/humidity at a given time or date where the given time is matched to the closest available history data) would suffice.