Problems with total daily energy (shelly1pm)

I have a Shelly1pm in which the counter does not resist. After restart, it usually works for a few days, then problems again.
Does anyone know what you can do?

  - platform: total_daily_energy
    name: "Tages Verbrauch"
    power_id: "shelly1pm_power"
    device_class: energy
    state_class: measurement
    filters:
      - multiply: 0.001
    unit_of_measurement: kWh