How to manage multiple sets of identical mqtt based entities?

I have numerous identical devices that communicate with HA via mqtt. I’ve defined entity entries for the various sensor values but as I add more devices, it becomes very tedious to duplicate the entity definitions for each of them.

Is there a more elegant way to solve this? Is creating a custom integration my best bet?

Get your devices to send retained discovery messages to /homeassistant so they are automatically discovered.