How can I build a helper for time of use with max demand charge plan with emporia?

I am using the Emporia custom integration which tracks usage by 1 minute, 1 day, or 1 month. My electric company penalizes me based on my highest hour of use between 4pm and 7pm over the entire month.

95% of the time we have very low usage between 4 and 7 PM but every once in a while, my car charges before it should, someone turns the AC up, etc and it blows up our bill for the month.

How can I create a helper that will use either the daily or min level data from the Emporia Vue integration to monitor an hour of usage? I have tried several and can’t get it to work :(.