The device must be set as “cumulative” energy device.
If it’s a virtual device, the app must support this.
For HomeAssistant app I added the device setting to change the energy settings.
If you are using the AVD app, then it’s currently not possible
[APP][Pro] Advanced Virtual Device (Device Capabilities App) with Unique Text Status Indicator - #668 by RonnyW