Weather station?

First things: The history is typically provided by HA when you (regularly) receive sensor values like temperatures. So everything which can be integrated in HA will give you a history. Maybe you want to extend the HA statistics with something like influxdb and grafana for long term data aggregation and viewing.

Depending how committed you are a cheap DIY weather station can be build based on a esp with esphome. For example it can be combined with a bosch BME280 sensor which features temperature, humidity and pressure.

Plenty of projects are out there - including more advanced ones: