Which entity is expected under "Solar production"?

I’m trying to understand what kind of entity/value HA expects on the Energy Dashboard under Solar Production. I have a few options, but I’m not entirely sure which one is the right one:

  • Two entities from the P1 smart meter that appear to represent the amount of energy returned to the grid in kWh, with each entity for a different cost/tariff scenario. I’ve been using these two, but they don’t seem to lead to the expected output.
  • I also have an entity from the P1 smart meter that shows the amount of energy currently generated by the solar panels, however, since this is in kW, I can’t seem to select this in the Energy Dashboard, as it expects kWh. I could try and do some conversion, but from what I read elsewhere in the community, this is not straightforward nor precise.
  • There might be a kWh value that can be obtained from the solar panels system itself, however, the Enphase integration is currently broken or incompatible with my firmware version (it tries connecting to my local Enphase device using https to a direct IP address, which leads to an SSL error).

Any advice or best practice here? Thanks!

I use the Enphase Envoy (DEV) which works with my Enphase D7.0.88 firmware. I use this entity from Envoy:


Then convert it to kWh using Riemann Sum helper.

Then create this template.sensor for Energy Dashboard:

- sensor:
      name: Solar Panel Production
      state_class: total_increasing
      unit_of_measurement: kWh
      device_class: energy
      icon: mdi:solar-panel-large
      state: >
        {{ states("sensor.helper_envoy_current_power_production_riemann")|float }}

People might say Riemann conversion not accurate, but the total value is the same as the Enphase Enlighten mobile app “Energy Production”.

Here is my story: