Import old energy readings for use in energy dashboard

It’s not really documented, hence the nature of the spook tools, but here’s a sample working data for the service recorder.import_statistics. Seems that you still may need to do more data manipulation once you call this service, but hopefully this can get you started.

service: recorder.import_statistics
data:
  has_mean: false
  has_sum: true
  statistic_id: sensor.gas_meter
  source: recorder
  name: "NULL"
  unit_of_measurement: CCF
  stats:
    - start: "2023-05-01T00:00:00+06:00"
      state: 517.76
      sum: 0.94
1 Like