Energy Page in Home Assistant with PVOutput?

Has anybody got the new Energy page working correctly under Home Assistant with PVOutput? I initially had something running by manually setting the last_reset to 1/1/1970 and manually setting the Device class and State class, but it wasn’t right. Each hour showed the total amount of generation and consumption for the day instead of the delta for just that hour. It seemed like the integration for PVOutput was fixed to not need last_reset anymore, so I removed it, but then I didn’t get anything in the Energy page at all.

I’ve got data from a Rainforest Eagle and SolarEdge feeding into PVOutput and I can see the daily generated total and consumed total in Home Assistant without issue, I just can’t get the Energy page to work correctly.

This works for me. I have it in packages, but should work directly in config.yaml

sensor:
  - platform: pvoutput
    system_id: Your5digitSystemID
    api_key: YourAPIkey
  - platform: template
    sensors:
      power_consumption:
        value_template: "{% if is_state_attr('sensor.pvoutput', 'power_consumption', 'NaN') %}0{% else %}{{ state_attr('sensor.pvoutput', 'power_consumption') }}{% endif %}"
        friendly_name: "Using"
        unit_of_measurement: "Watt"
      energy_consumption:
        value_template: '{{ "%0.1f"|format(state_attr("sensor.pvoutput", "energy_consumption")|float/1000) }}'
        friendly_name: "Used"
        unit_of_measurement: "kWh"
      power_generation:
        value_template: '{% if is_state_attr("sensor.pvoutput", "power_generation", "NaN") %}0{% else %}{{ state_attr("sensor.pvoutput", "power_generation") }}{% endif %}'
        friendly_name: "Generating"
        unit_of_measurement: "Watt"
      energy_generation:
        value_template: '{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "%0.2f"|format(state_attr("sensor.pvoutput", "energy_generation")|float/1000) }}{% endif %}'
        friendly_name: "Generated"
        unit_of_measurement: "kWh"