I have a Solis inverter and a Seplos kit battery (JK balancer, Seplos BMS). The Solis has really coarse (1kWh) energy total measurements over Modbus which creates sudden jumps in the battery totals. To fix this, I’d like to pull the readings from the Seplos power monitor into HA’s Energy Dashboard and use an integration on the instantaneous power (Watts) to get the kWh totals.
I’ve put this together in config.yml and while I can add the integral sensors to the Energy dashboard, it doesn’t show the battery charging and discharging. The values appear in the history view, and Energy Dashboard configuration seems happy (no errors) but if I use the integration sensors, the dashboard itself shows no energy in/out of the battery.
I’m having to define the integrators in the YAML because the Energy Dashboard won’t let me select a Helper as a measurement source.
What am I doing wrong?
homeassistant:
customize_glob:
sensor.*_energy:
last_reset: '1970-01-01T00:00:00+00:00'
device_class: energy
state_class: measurement
# Templates for photovoltaic system -- battery power
template:
- sensor:
- name: "PV Battery Discharge Instant"
unit_of_measurement: "W"
device_class: power
state_class: measurement
state: >
{% if states('sensor.esp_solar_inverter_battery_power')|float <= 0 %}
{{ (-1 * states('sensor.esp_solar_inverter_battery_power')|float) }}
{% else %}
0
{% endif %}
- name: "PV Battery Charge Instant"
unit_of_measurement: "W"
device_class: power
state_class: measurement
state: >
{% if states('sensor.esp_solar_inverter_battery_power')|float >= 0 %}
{{ states('sensor.esp_solar_inverter_battery_power')|float }}
{% else %}
0
{% endif %}
sensor:
- platform: integration
name: "PV battery discharge energy"
source: sensor.pv_battery_discharge_instant
method: left
- platform: integration
name: "PV battery charge energy"
source: sensor.pv_battery_charge_instant
method: left