Problem with Entity History

Hi there,

i made a mistake in my data and got an entity, wich has wrong data. It’s a consumption meter. i set the right value via developer tools and deleted all the wrong entrys via statistics in the dev tools. When the meter receives new data, it will go back to the old value. Where does the data come from?
Here is the definition of the sensor:

state_class: total_increasing
source: sensor.ladekosten_wallbox_stunde_dynamisch
status: collecting
last_period: 0
last_valid_state: 0.0
last_reset: 2023-12-13T07:57:00.252450+00:00
unit_of_measurement: EUR
icon: mdi:counter
friendly_name: Ladekosten Dynamischer Tarif

The Source Sensor (template sensor): sensor.ladekosten_wallbox_stunde_dynamisch

- sensor:
    - name: "Ladekosten Wallbox Stunde Dynamisch"
      unit_of_measurement: "EUR"
      state: >
        {{ 
          (
            states('sensor.epex_spot_data_net_price') | float(default=0) * states('sensor.wallbox_verbrauch_stunde') | float(default=0) / 100
          ) | round(2) if states('sensor.epex_spot_data_net_price') != 'unknown' and states('sensor.wallbox_verbrauch_stunde') != 'unknown' else 0 
        }}

sensor.wallbox_verbrauch_stunde (hourly reset)

state_class: total_increasing
source: sensor.tesla_geladen_brutto
status: collecting
last_period: 0.17
last_valid_state: 2514.66
meter_period: hourly
cron pattern: 0 * * * *
last_reset: 2023-12-18T07:00:00.002201+00:00
unit_of_measurement: kWh
device_class: energy
icon: mdi:counter
friendly_name: Wallbox Verbrauch Stunde

I don’t know how to fix this problem. I already waited for the sensor.wallbox_verbrauch_stunde to reset. But no difference… Any ideas?

Thanks!

Did some additional work. All sensors are 0 and the “Ladekosten Wallbox Stunde Dynamisch” Sensor is set to the right value (~16€). After the Meter “Wallbox Verbrauch Stunde” counts some data, the value of “Ladekosten Wallbox Stunde Dynamisch” goes back to the wrong value (~70€).

I don’t want to create new sensors to fix this…

I just did a backup restore to fix this…