Entities in the MQTT platform should have their topics published as state attributes

Any entity that uses MQTT should have all of its attributes that end in “_topic” available as state attributes.

  1. Sometimes I’ll create a device, and maybe not name it very well, or having it use a particular topic, but then move it around. I try to reflect the use of the device in the name of the entity, but the MQTT topic may not match. It would be nice if I could easily correlate an MQTT topic with an entity in home assistant.
  2. Often it is possible to use MQTT topics that are similar in form to the ones specified for the entity, but that do other operations. TASMOTA devices, for example have dozens of commands that can be used to query and perform actions. If I could dynamically figure out the topic name of a TASMOTA device based on its entity, I could write useful automations.