Average temperature during the specific date interval

Sorry, no help just yet, but this is something that my var integration should handle easily once I figure out how to hook the HA database.