Change device class and other of discovered MQTT devices

Hello,

if have a device that autodiscovers some mqtt devices.
That works very cool, but if have one issue with the configuration of the energy dashboard.
The electricity source needs as device_class “energy” and some other small modification, like increasing_counter, …
My autodiscovered MQQT electricty counter does not have this device class. How can I add this partameters to this? The autodiscovered MQTT devices are not in the configuation.yaml or in the mqtt.yaml.
Any hint?

Thanks,

Sönke