Help Creating Sensor To Measure Data Consumption

Good day,

I have a project I’d like to look into, but I have no idea where to start…

I have a PFSense router which I integrated into Home Assistant, but I can find no way to gather statistics about the data consumption. The integration I use creates two entities…

sensor.pfsense_exodus_interface_wan_inbytes sensor.pfsense_exodus_interface_wan_outbytes

These sensors reset every reboot of the router, which isn’t often, but it happens…

Basically, I want to create a sensor/helper or whatever to calculate the data used maybe once per hour, and record it so I can have long-term stats about how much data I’m using. Any ideas how this could be accomplished? I appreciate any help you can provide.

Thanks,
Steven