Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Assistant Energy Dashboard - Long-term Statistics #74

Open
MidnightLink opened this issue Aug 19, 2023 · 5 comments
Open

Home Assistant Energy Dashboard - Long-term Statistics #74

MidnightLink opened this issue Aug 19, 2023 · 5 comments

Comments

@MidnightLink
Copy link

MidnightLink commented Aug 19, 2023

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

@Bettapro
Copy link
Owner

Bettapro commented Aug 20, 2023

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)

@MidnightLink
Copy link
Author

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?

@Bettapro
Copy link
Owner

Bettapro commented Aug 20, 2023

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

@MidnightLink
Copy link
Author

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

@Bettapro
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants