Hi,
I wonder if someone could help in explaining the energy dashboard for me. For some reason I am getting a negative value for the battery input although all sensors providing data are positive.
Dashboard screenshot:
The value that is negative is the “Victron Battery Input Riemann”.
How it is currently set up is that the energy going into the battery and out of the battery is provided by a single modbus sensor, the values going out of the battery are negative and values going into the battery are positive. From this modbus sensor I split the positive and negative values into two separate sensors using the template platform and ensure both values are positive:
# Power going into the battery (charge)
victron_battery_power_input:
device_class: power
friendly_name: "Battery Input Power"
unit_of_measurement: "W"
value_template: >
{% if states('sensor.victron_battery_power_system')|float >= 0 %}
{{ states('sensor.victron_battery_power_system') }}
{% else %}
0
{% endif %}
availability_template: >
{{ states('sensor.victron_battery_power_system')|is_number}}
# Power going out of the battery to the house (discharge)
victron_battery_power_output:
device_class: power
friendly_name: "Battery Output Power"
unit_of_measurement: "W"
value_template: >
{% if states('sensor.victron_battery_power_system')|float < 0 %}
{{ states('sensor.victron_battery_power_system')|float*(-1) }}
{% else %}
0
{% endif %}
availability_template: >
{{ states('sensor.victron_battery_power_system')|is_number}}
To have this data be used in the energy dashboard I create 2 riemann helpers:
- platform: integration
source: sensor.victron_battery_power_output
name: Victron Battery Output Riemann
method: left
unit_prefix: k
round: 3
- platform: integration
source: sensor.victron_battery_power_input
name: Victron Battery Input Riemann
method: left
unit_prefix: k
round: 3
The data clearly shows positive values when looking into the history of the riemann sensors:
But yet the energy dashboard doesn’t seem to align with this:
If you look at the energy dashboard the Riemann sensors doesn’t seem to be showing the same values as those in the developer tools state.
Is this how it is suppose to be? Or am I perhaps interpreting the results incorrectly? Any assistance would be appreciated.