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.