Use this code to keep long term weather records in Home Assistant
You will need the following helpers: