Solar production not appearing in energy usage chart

Greetings,

I have my incoming feed from the power company (labeled DTE.wh) and the incoming feed from my small-scale solar inverter (labeled Solar.wh) set up in Home Assistant as follows:

The power company power shows up in the Energy dashboard’s Energy Usage chart correctly, and the solar production shows up in the Energy dashboard’s Solar Production chart correctly, but the solar production/usage does not show up in the Energy Usage chart at all:

On other peoples’ Energy dashboard screenshots, their solar self-consumption seems to show up in the Energy Usage chart in the same yellow/orange color that it does on the standalone Solar Production chart. This is nice to be able to see at a glance how much energy was consumed from the power company vs from the solar panels. Does anyone have any idea what I need to do in order to enable this?

One idea I found while searching for information on this was to add the solar panels a second time, under “grid consumption”, then create a theme to assign a suitable color to that particular source. But I am very new to Home Assistant and thought I should ask first whether this is the right way to set this up, or whether I might be missing some other simpler thing.

Thanks in advance for any advice you may be able to provide!

To have the solar energy appear on the upper graph you need a return to grid sensor:

Note: this is not just a copy of your solar production. It must only accumulate energy when you are actually feeding energy to the grid.
Once you have this set up you should see something like this:

Screenshot 2023-01-17 at 09-03-43 Energy – Home Assistant

1 Like

Ah ha - that did it. Thanks so much for the info!

My system is set up to never export any energy to the grid, so I hadn’t even thought about setting up the return-to-grid sensor in the Energy dashboard configuration.

1 Like

Hello @DrDeke , what did you do, did you set up a fake sensor? I got a grid 0 inverter so I do not have the ability to inject on grid, however I think it is cool to have this view :grin: , so if I understood it right, this requirement to have the “Return to grid” should not be a must in our case, something to be improved…

Yup, a fake sensor that always reads 0 W (I too never export to the grid).

I didn’t know how to set that up in home assistant at the time, so I created it in the IotaWatt I am reading data from. Doing so causes it to show up as a sensor in HA.

Hi,

can someone explain how to create the fake sensor?

Thanks

Try this (in configuration.yaml):

template:
  - sensor:
      - name: Grid Export
        state_class: total_inreasing
        device_class: energy
        unit_of_measurement: kWh
        state: 0

Hallo Tom,

i tryed it, but i got this error:

Logger: homeassistant.config
Source: config.py:982
First occurred: 18:23:43 (1 occurrences)
Last logged: 18:23:43

Invalid config for [template]: expected SensorStateClass or one of 'measurement', 'total', 'total_increasing' for dictionary value @ data['sensor'][0]['state_class']. Got 'total_inreasing'. (See /config/configuration.yaml, line 131).

What i am doing wrong?

Nothing. I spelled increasing incorrectly. Try this:

template:
  - sensor:
      - name: Grid Export
        state_class: total_increasing
        device_class: energy
        unit_of_measurement: kWh
        state: 0

Hallo Tom,

it worked… Thank you!

grafik

1 Like

Hello

I Saw your second picture, showing the production charts.
I was wondering why the solar production and the solar total are equal?

I had to set up my home assistant completly new becaus of a memory crash. Before that, the solar.wh valuewas the daily production and the solar total was the total of the complet produktion.

In my energy dashboard both values soalr.wh and solar total start by 0 every day. The summation is nowhere listed in the board

I use a zigbee plug for monitoring my solar produktion and the only entity I can use for the energy dashboard is summation delivered unit kWh.

Any idea?