Howto reset/change state of integration sensor

I can not by the live of me reset the value of a sensor that integrates over the power to calculate the energy of an appliance. The underlying power-sensor is NOT configured for recorder.
This is happening with ALL integration-sensors.

What I have tried:

  • Set the state in dev-tools
  • disable recorder
  • purge the history from the database
  • delete statistics from database
  • completely remove sensor from configuration.yaml, reboot and readd

Whatever I do, after a few seconds the state goes back to the last known state.

This is the sensor:

  - platform: integration
    name: kitchen_outlet_boiler_energy_total
    source: sensor.kitchen_outlet_boiler_power
    round: 2
    unit_prefix: k
    method: left

Any ideas how to get rid of the faulty value?

3 Likes

Also looking for this.

Any solutions found? I also need this.

1 Like

Any solution?

I’m remembering a workaround only that worked for me was to do the:

  • completely remove sensor from configuration.yaml, reboot and readd

and make sure new sensor had a new name so then no link to any previous bad data.

1 Like

Guessing this is still not possible.
Found you can edit the file core.restore_state and restart, but not realistic for seeing eg how much energy my tv uses each day.

I’ve tried everything suggested here before I came here… I’m shocked there is no way to do this, especially when developer tools states seems designed for the purpose.