MQTT last_reset_topic, last_reset_value_template

In the latest release, there is a braking change for me:

MQTT sensor configurations that still use last_reset_topic will fail. The support was deprecated in Home Assistant 2021.11 and is now removed. Users should use last_reset_value_template instead.

Can anyone point me in a direction to fix this? I cant find any useful information.

mqtt:
  sensor:
    - name: "Growatt outputpower"
      state_topic: "growatt/data"
      value_template: "{{ value_json.outputpower }}"
      unit_of_measurement: "W"
      device_class: "energy"
      state_class: "measurement"
      last_reset_topic: "growatt/data"
      last_reset_value_template: "{{ as_datetime('1970-01-01T00:00:00+00:00') }}"

If I remove the “last_reset_topic” then the sensor is no longer available in the energy dashboard.
I can’t find how to set up this without using “last_reset_topic”

State class measurement does not require a last reset value.

Remove last_reset_value_template: as well as last_reset_topic:

Also you have the wrong device class, it should be:

      device_class: "power"

You appear to be confusing power (W) with energy (Wh). Two different things.