Customize lovelace entities history

The easiest way to do this is to replace the more-info card with your own using browser-mod: GitHub - thomasloven/hass-browser_mod: 🔹 A Home Assistant integration to turn your browser into a controllable entity and media player

You could replace the more info pop-up card with this Lovelace card that lets you choose the time to display for example: