How to prevent incorrect "spikes" in an Energy sensor's data?

I am using the Tesla HACS plugin, and occasionally it (or Tesla?) reports like “full production” on my Tesla sensor, usually in the morning:

This obviously throws off my energy reporting for the day. I am not sure how to even edit/delete those incorrect data points. (I’m still somewhat new to HA) - but I am wondering if there’s some way to wrap this sensor in something that filters out these wild variations - given that a solar panel should never jump like that.

In my configuration.yaml, this is how I present my energy sensor:

  - platform: integration
    source: sensor.xxx_solar_panel
    name: tesla_solarpanels_new_kwh
    unit_prefix: k
    round: 2

I do this to “wrap” the output for use in Energy, and it works well. The graph above is from sensor.xxx_solar_panel's history.