I have a Shelly Pro 3EM that I use to monitor the entergy in my house, using the total active energy sensor. I move a house so I did a reset on the Shelly app (Delete sensor data) to zero all history. On HA I delete the device and re-added it, and then I realized my mistake, where my energy showed a massive negative energy value (see attached pic).
From this point I tried reset the sensor history on HA but all attempts failed. What I tried was:
- Tried using
purge_entitiesaction which gave an OK but didn't do anything. I used the following:
data:
entity_id:
- sensor.shelly_power_monitor_total_active_energy
keep_days: 0 # 0 = delete all matching rows```
2. Tried renaming the entity and deleting/adding the device which did nothing, the history renamed.
3. Tried to adjust it via `developer tools -> statistics -> adjust sum` but it didn't mark the delete as an outlier so I couldn't find it and delete it.
4. Tried downloading `hestiia-engineering/hass_sql_request` to run something like `DELETE FROM states WHERE entity_id="sensor.shelly_power_monitor_total_active_energy";` but it also didn't work because after installation and restart I couldn't find the new `sql_request.delete action`
I would really appreciate some help in reseting the sensor and deleting all history.
Thanks!