Solar-Tracer-Blynk-V3 icon indicating copy to clipboard operation
Solar-Tracer-Blynk-V3 copied to clipboard

Home Assistant Energy Dashboard - Long-term Statistics

Open MidnightLink opened this issue 1 year ago • 5 comments

Describe the bug The MQTT integration doesn't report any usable device energy statistics in Home Assistant

To Reproduce Steps to reproduce the behavior:

  1. Set up device with SolarTracerBlynk_3.0.9_esp32dev_mqttHA

Expected behavior Add device statistics to Energy Dashboard in Home Assistant

Screenshots mqttdata

Additional context Device is configured and data is coming through but I'm unable to add to the energy dashboard as shown on the HA config page

Seems that the individual sensors are also not showing up in Developer Tools -> Statistics, which explains why it's not showing up in the energy dashboard as an option

MidnightLink avatar Aug 19 '23 05:08 MidnightLink

Are you still unable to selected energy readings? as far as I know the UOM (Kwh) should be enought. If not please provide some more details like your config.h and your HA config page (screenshot)

Bettapro avatar Aug 20 '23 16:08 Bettapro

config.h hasn't been changed as I'm using the default esp32dev_mqttHA file

Anything in particular you'd like a screenshot of? Like MQTT?

MidnightLink avatar Aug 20 '23 16:08 MidnightLink

I double check my setup, home assistant requires those value to be state_class=total_increasing. The mqtt-HA library cannot specify this..... 😞

You can do so by:

  1. Editing yaml file of your HA, adding something like:
sensor.energy_generated:
  state_class: total_increasing
  1. Creating a "utility meter" helper like: image

Bettapro avatar Aug 20 '23 16:08 Bettapro

I'm getting an invalid domain error when trying to add it to my yaml config. Do you have it under sensors?

MidnightLink avatar Aug 20 '23 18:08 MidnightLink

Here the complete entry:

homeassistant:
  customize:
    sensor.solartracer1_solartracer_energy_generated:
      state_class: total_increasing

You can refer to HASS docs: https://www.home-assistant.io/docs/configuration/customizing-devices/#manual-customization

Bettapro avatar Aug 21 '23 14:08 Bettapro