Mqtt Sensor is unknown

Hello,

iam ne and in need some help with mqtt broker.

I installed the wmbusmeters addon and want to received datas from my watermeter. The addon sends the received data to mosquitto mqtt. The values ​​shows:

Entitäten

  • MainWater status burst (binary_sensor.mainwater_status_burst)
    MQTT discovery data:
    • Topic: homeassistant/binary_sensor/wmbusmeters/76406477_status_burst/config
    • Payload

device: identifiers: - wmbusmeters_76406477 manufacturer: Kamstrup model: multical21 name: MainWater sw_version: ‘76406477’ enabled_by_default: true device_class: problem name: MainWater status burst state_topic: wmbusmeters/MainWater unique_id: wmbusmeters_76406477_status_burst value_template: ‘{{ ‘‘BURST’’ in value_json.current_status }}’ payload_on: ‘True’ payload_off: ‘False’ platform: mqttSubscribed topics:

  • wmbusmeters/MainWater

8 zuletzt empfangene Nachricht(en)

* Received 20:33:48

  * QoS: 0, Retained
  * Payload: `{"media":"cold water","meter":"multical21","name":"MainWater","id":"76406477","status":"OK","total_m3":82.303,"target_m3":76.62,"flow_temperature_c":4,"external_temperature_c":8,"current_status":"","time_dry":"","time_reversed":"","time_leaking":"","time_bursting":"","timestamp":"2023-01-21T19:05:31Z","device":"im871a[00103512]","rssi_dbm":-14}\`

My Problem is, that the mqtt sensor are unknown. What ist the Problem ?

You might have to setup the various information in the payload as sensors manually in configuration.yaml. There seems to be several types of data in the payload. The addon may not be setup correctly or just not recognized by Homeassistant. You have an MQTT payload so you can still use it.

mqtt:  
  sensor:  
    - name: "flow temperature"
      device_class: "temperature"
      state_topic: "homeassistant/binary_sensor/wmbusmeters/76406477_status_burst/config"
      value_template: >
        {% if value_json is defined and value_json.id == 76406477 %}
          {{ (value_json.flow_temperature_c)|round(1) }}
        {% else %}
          {{ states('sensor.flow_temperature')|round(1) }}
        {% endif %}
      unit_of_measurement: "°C" 

for example

I see someone else has set it up on HA
https://community.home-assistant.io/t/add-on-request-wmbusmeter/228988/13

Good morning,

I’ve added your suggestion to the cofiguration.yaml. I had no success. The sensor is shown as unavailable. The mqqt settings are described in the subfolder of the addon. Are the values ​​correct here? here is the setting from the wmbusmeters folder:

total_m3": {
“component”: “sensor”,
“discovery_payload”: {
“device”: {
“identifiers”: [“wmbusmeters_{id}”],
“manufacturer”: “Kamstrup”,
“model”: “{driver}”,
“name”: “{name}”,
“sw_version”: “{id}”
},
“enabled_by_default”: true,
“json_attributes_topic”: “wmbusmeters/{name}”,
“state_class”: “total”,
“device_class”: “water”,
“name”: “{name} total”,
“state_topic”: “wmbusmeters/{name}”,
“unique_id”: “wmbusmeters_{id}_{attribute}”,
“unit_of_measurement”: “m³”,
“value_template”: “{{ value_json.{attribute} }}”,
“icon”: “mdi:gauge”
}