Displaying multiple attributes of a custom (non-commercial) sensor published via MQTT on a single Card

Using Mosquito MQTT together with OpenMQTTGateway/RT433_ESP, I am able to get all my “commercial” 433Mhz sensors to automatically populate the Overview dashboard with each sensor entity displayed automatically and separately in its own card along with all its attributes. This all happens auto-magically.
I can also add the resulting named sensor card to other dashboards without any effort.

I have built some manual sensors (e.g., BME680) powered by an esp32. Using PubSubClient.h, I am able to publish MQTT topics with JSON payloads of form:

{"temperature_F":65.69,"humidity":38.31,"pressure_mmHG":29.46,"gas_KOhms":17}

(I can of course change the format if need be)

I would like to be able to display all the BME680 attributes grouped a single card in the stock Overview dashboard (as well as any other custom weather dashboards I might create)

I can add a sensor stanza under the mqtt: heading by adding the following to configuration.yaml.

mqtt:
  - sensor:
      name: Outside-Back
      state_topic: "outside-bme680"
      json_attributes_topic: "outside-bme680"
      value_template: "{{ value_json.temperature_F }}"
      unit_of_measurement: "°F"

All the BME680 attributes are detected show up under Developer Tools->States, however, the Overview dashboard only displays the Temperature (or unknown if I leave out the value template). Moreover, the value is displayed and grouped under the Sensor card mixed in with any other miscellaneous MQTT sensors similarly defined in configuration.yaml.

So my question is how do I manually create a new custom card named say Outside Back that groups all the attributes (temperature, humidity, pressure, gas) of this particular sensor on a single card which in turn can be displayed in turn on the “Overview” and other dashboards?

I could presumably create multiple - sensor: stanzas in configuration.yaml but that bunches them in with all the other miscellaneous Sensor entities, plus it is very repetitive and laborious.

Once I get it working manually, I also would be interested in how I can get custom sensors to be discovered and configured automatically via MQTT the way my commercial sensors show up.

You’re asking a lot of questions that should be topics of their own. It confuses what you are asking.

Add an “Entities” card to your dashboard for each group of entities you want to display. Populate the card with the “entityID” (that you get from Developer Tools / States) of each of the data you want in the card.

As I understand, he want them displayed in a card in the auto-generated dashboard.

You need also publish mqtt discovery messages to achieve what you want, and skip the manual configuration

Thanks I ended up creating a script to publish the mqtt ‘config’ topic for the device of form:

{
  "name": "Temperature",
  "unique_id": "MyDevice-BME680-Temperature_C",
  "state_topic": "+/+/MyDevice/bme680",
  "value_template": "{{ value_json.temperature_C | is_defined }}",
  "device_class": "temperature",
  "state_class": "measurement",
  "unit_of_measurement": "°C",
  "device": {
    "identifiers": [
      "backplug"
    ],
    "name": "My Device",
    "model": "XXXXX",
    "manufacturer": "YYYYY",
    "sw_version": "M.N.P"
  }
}

I then repeated this for each of the entities in the BME680 device (temperature, humidity, pressure, gas). This allowed the MQTT integration to discover the device.

Then in LoveLace a card was automatically created for the device containing all the entity elements