Here my further test-results and findings:
- I multiplied the values for my ((Wh) Riemann-entity with 1000 in the file
core.restore.state
after running the fix and before restart the HA-core.
(Watch out: this value is given three times in these kind of entities, multiply all three!!):
{
"state": {
"entity_id": "sensor.energie_vaatwasser_7",
"state": "460201.82",
"attributes": {
"state_class": "total",
"source": "sensor.id_7_19",
"unit_of_measurement": "Wh",
"device_class": "energy",
"friendly_name": "Energie vaatwasser (7)"
},
"last_changed": "2023-06-30T17:43:50.594136+00:00",
"last_updated": "2023-06-30T17:43:50.594136+00:00",
"context": {
"id": "01H46PEWJ22B511DA6E34HYYFD",
"parent_id": null,
"user_id": null
}
},
"extra_data": {
"native_value": {
"__type": "<class 'decimal.Decimal'>",
"decimal_str": "460201.82"
},
"native_unit_of_measurement": "Wh",
"source_entity": "sensor.id_7_19",
"last_valid_state": "460201.82"
},
"last_seen": "2023-06-30T17:44:04.827239+00:00"
}
Now waiting for passing a full hour to see whether the negative energy bars are gone for the individual devices in the Energy-Dashboard.
[EDIT} passing full hour 20:00 and …
NO NEGATIVE VALUES !!!
- Like the short time statistics, the states will be all corrected within ~ 10 days. Old values will fade away. So no extra changed made for these.