Publish all entities from one device to MQTT

Hi,
I do have a device, which provides 76 entities.

To have the ability to use these entities beyond HA, I would like to publish all of them (as soon as there is a change of state) to MQTT.

Until now I’m using an automation for one entity (from an another device) to publish state changes to MQTT. But using this approach for all 76 entities would be a bit inifficient from my point of view. Also thinking about: What if the device suddenly has more entities, these should be automatically added to the MQTT distribution.
Is there a more easy, convenient way to achieve this?

To be honest: I do have not that much script experience, so any hint is really appreciated.

Thanks
J

See the mqtt statestream integration

1 Like

Thanks for that hint. I never stumbled across that page while searching for possible solutions.

Is it possible to define that a subset of sensors (i.e. sensor.inverter_) should be written an another subtopic?
Currently I can include only sensor.inverter_
but if I have to add an another sensor at some point, they all will be mixed up in one topic.

No

The doc: