If you wanted to fix the error for the Energy dashboard, it should be fixed now.
If you wanted to fix regular History Graph cards on your custom dashboards, I don’t think that’s currently possible without manually changing the database. However, as Tom wrote, these graphs can only show the last 10 days by default.
I just thought that explaining why the state history would be removed after 10 days might help with understanding the whole system, especially the difference between history and long-term statistics.
Let me guess. The person who set it to 40000 days complained about database size in the hundreds of GB, or worse, database corruption…
I would like to correct this data, but honestly I don’t know what to do. the data are few because I have recently mounted the system and the purge is not yet set (I’m afraid of losing the energy data)
i have an inverter goodwe em series and expose the data of battery, solar panel and more in watt, when battery is in discharged mode the valui is positive, when in charged mode the value is negative an this for all sensor.
now i converte de w in kWh with rienmann integration:
#######FOTOVOLTAICO
#BATTERIA
- platform: integration
source: sensor.battery_power ###sensor from inverter
name: FV batteria power
unit_prefix: k
round: 2
method: left
#PANNELLI
- platform: integration
source: sensor.pv_power ###sensor from inverter
name: FV pannelli
unit_prefix: k
round: 2
method: left
- platform: integration
source: sensor.on_grid_export_power ###sensor from inverter
name: FV energie
unit_prefix: k
round: 2
method: left
- platform: integration
source: sensor.house_consumption ###sensor from inverter
name: FV consumo casa
unit_prefix: k
round: 2
method: left
and the i create a template for converting valui for energy dashboard
now i see in the dashboard the energy use from battery in 0, but last 3 hours i use them.
my doubt is, being kwh and maybe it passes the value from positive to negative I don’t actually know how much it is doing, I imagine that I produced 3kwh of these 1 I consume and 2 it takes from the battery (here I have a negative sensor) in the next hour I don’t produce anything and I take 2 from the battery, the sensor converted into kwh theoretically goes to 0 because I have the -2 of the recharge and 2 that I have consumed. at this point it is let’s say not very useful, do you think it would be better to take the raw sensor in watts from the inverter via template and convert the template into kwh and not the inverter sensor?