Can't find my solar panels in energy configuration

I’m trying to use new energy dashboard, but I have two problems:

  1. My panels aren’t listed in energy configuration system.
  2. My Grid feed/comsumption is the same, just the signal (plus or minus) tell me if I’m feeding or getting from grid.

For the first problem, my panels are metered in ‘W’ (I’m using Fronius integration). So I have created a new sensor template like this (this is inside ‘template’ merged files):

- sensor:
    - name: "Energia Painel Solar"
      unit_of_measurement: "kWh"
      unique_id: 'energia_painel_solar'        
      device_class: energy
      state_class: measurement
      state: "{{ states('sensor.power_photovoltaics_fronius_power_flow_0_http_192_168_22_46')|float / 1000 | round(4) }}"

The sensor is created in HA and the value is correct, but it still doesn’t get listed in “Solar Panels” configuration of Energy dashboard. What am I missing?

About the second problem:
My sensor “sensor.power_grid_fronius_power_flow_0_http_192_168_22_46” has a positive value when I’m getting power from GRID and negative value when I’m feeding energy to grid. How do I use this in energy dashboard? It’s possible?

Ok, got it working. Was missing last_reset parameter.
But now I’m getting wrong values. It’s night, I’m getting energy from grid and dashboard is saying that I’m feeding energy to grid. I have splited my sensor in two: one that have powe ‘get from grid’ (positive values always) and another one that display energy feed to grid (positive always). Currently, only ‘get from grid’ have value…but dashoard display that I’m feeding.
So, my question is: where can I find documentation of what is expected from energy dashboard? (in terms of values and signals, + and -)?
I have double checked configuration and It’s configured with the right entities in “Grid Consumption” and “Return to Grid”.

You can’t take a W sensor, divide it by 1000 and expect is a kWh sensor
W = instantaneous energy
kWh = energy over a period of time

You need to use the integration integration to convert from W to kWh.
oh, and use the left method.

See, that’s where start to get confuse.
In energy dashboard configuration, to select itens (grid, consumption, solar panel, etc…) it must be a select entity. To list an entitie there, it must have ‘last_reset’ attribute, device_class=energy AND state_class=measurement…but measurement means ‘current’ value, not cumulative value (acording to developers manual, Sensor Entity | Home Assistant Developer Docs (

So my question still: is there any documentation explaining what kind of data should be used in these fields of energy dashboard configuration?
Also, that card with rounded itens and solar panels/grid/house (the card in the top-right of dashboard), is the real-time or day-cumulative data?

I could figure out how to use the Riemann integration, but it does not show up in the Dashboard as
device_class=energy is still missing and is not allowed to use in sensors.

- platform: integration
  source: sensor.ac_consumption_l1
  name: "Multiplus Total Power today"
  unit_prefix: k
#  unit_time: d
  round: 2
#  device_class: energy

In another post I got the answer; the Watt sensor needs to have

device_class: power

then it works.

    - name: 'Multiplus Critical Loads'
      unit_of_measurement: "W"
      slave: 246
      address: 23
      scan_interval: 2
      scale: 10.0
      precision: 0
      device_class: power