I’d like to propose a feature that allows any sensor to include the option to publish the sensor data to MQTT.
By including a configuration option of mqtt_topic:
the sensor.state
could be published to the specified MQTT topic.
Whilst something similar can be created with the MQTT_Statestream integration, you are limited to a specific base topic and topic structure. If you wish to publish an item that requires a specific topic structure, MQTT_Statestream cannot be used.
Multiple automations to publish sensor data are a solution but are neither elegant or efficient.
It would also be useful if the sensor attributes could be published either as a JSON or as individual topics.
This might be applicable to other domains.