Integrating an history stats into energy card

Try this custom component:

Should cover your needs without creating a history stats sensor.