WTH is wrong with Energy Usage when Importing from Grid

Can you show me that raw sensor (w/o any postprocessing using templates, etc.) which is the source for Victron Battery Energy Charged? (Or if it’s already somewhere between the data you provided which one is it?)

https://drive.google.com/drive/folders/14Wz2WgxHtOhOi_T_VQBS-K9lH_0p4AA2

Here you go The Battery Power sensor is the data I get over MQTT.

value_template: "{{ value_json.value|float(default=0.0)|round(3, default=0) }}"
    unit_of_measurement: "W"

It says this folder is empty…?

Whoop! Apologies, it was awaiting WiFi to upload the files. Should be available now.
The Victron log sheet contains data downloaded from Victron’s Dashboard. This should be what I get over MQTT

Show me configuration of your Riemann sum integrals for Grid Power and Battery Power.

- platform: integration
  source: sensor.victron_grid_power
  name: Victron Grid Energy
  round: 3
  unit_prefix: k
  unit_time: h
  max_sub_interval:
    seconds: 1
  unique_id: victron_grid_energy

- platform: integration
  source: sensor.victron_grid_power_imported
  name: Victron Grid Energy Imported
  round: 3
  unit_prefix: k
  unit_time: h
  max_sub_interval:
    seconds: 1
  unique_id: victron_grid_energy_imported

- platform: integration
  source: sensor.victron_grid_power_exported
  name: Victron Grid Energy Exported
  round: 3
  unit_prefix: k
  unit_time: h
  max_sub_interval:
    seconds: 1
  unique_id: victron_grid_energy_exported

- platform: integration
  source: sensor.victron_battery_power_charged
  name: Victron Battery Energy Charged
  round: 3
  unit_prefix: k
  unit_time: h
  max_sub_interval:
    seconds: 1
  unique_id: victron_battery_energy_charged

- platform: integration
  source: sensor.victron_battery_power_discharged
  name: Victron Battery Energy Discharged
  round: 3
  unit_prefix: k
  unit_time: h
  max_sub_interval:
    seconds: 1
  unique_id: victron_battery_energy_discharged

Oh, I did not notice that when you posted your configuration before but you are missing:

method: left

w/o it defaults to trapezoidal.

Edit: Yeah I think left should be the default but…

1 Like

Ok, will give it a shot.