MQTT not receiving events

I have the following mqqt.yaml that is creating entities for some Meraki Devices I have on my network. The devices get created fine but the data never actually shows up in the entity (I just have a blank entity that never updates).

I’ve verified that the data is getting to the broker from the topics. I’m stuck here and not really sure where I’m going wrong. I’m new to MQQT.

I’ve tried it with |float and without |float.

  - button:
      name: "Button 1"
      unique_id: "Button"
      command_topic: "meraki/v1/mt/L_someNumber/ble/someMAC/buttonPressed"
  - sensor:
      name: "Pool Temperature Sensor"
      state_topic: "meraki/v1/mt/L_someNumber/ble/someMAC/temperature"
      device_class: "temperature"
      unit_of_measurement: "°F"
      value_template: "{{ value_json.fahrenheit|float }}"
      unique_id: "pool_temperature"
      device: {
          identifiers: [
              "Pool Temperature Sensor"
          ],
          name: "Pool Temperature Sensor",
          manufacturer: "Cisco Meraki",
          model: "MT11"
      }
  - sensor:
      name: "Refrigerator Temperature Sensor"
      state_topic: "meraki/v1/mt/L_someNumber/ble/someMAC/temperature"
      device_class: "temperature"
      unit_of_measurement: "°F"
      value_template: "{{ value_json.fahrenheit|float }}"
      unique_id: "refrigerator_temperature"
      device: {
          identifiers: [
              "Refrigerator Temperature Sensor"
          ],
          name: "Refrigerator Temperature Sensor",
          manufacturer: "Cisco Meraki",
          model: "MT11"
      }

Bump - Still unsure what could be causing this

mqtt: 
   sensor:
    - name: "Pool Temperature Sensor"
      device_class: "temperature"
      state_topic: "meraki/v1/mt/L_someNumber/ble/someMAC/temperature"
      value_template: "{{value_json.fahrenheit }}"
      unit_of_measurement: '°F'
      unique_id: pool_temperature

Try this version

Still the same results. Very odd. Could it have something to do with the data not having quotes around integers?

{
    "ts": "2024-12-08T00:01:59Z",
    "fahrenheit": 49,
    "celsius": 9.5
}

That’s what the data looks like. It’s coming from a sensor and being sent from Meraki Cloud, so there’s no easy way for me to add quotes back into the data.

The sensor itself does show up and I don’t get any errors. I just never actually see a value.

When I got to Devices → MQTT → Start Listening. I do indeed see the Messages coming in, so I know HA is getting them.


Photo of the event showing up in the MQTT Config section of HA.

I tried manually publishing one with a " around the fahrenheit field and I saw the even go through, but it sill doesn’t display in the dashboard :-/

In other news, I have a Meraki Button (MT30) and I was just able to sucessfully get it to tell me when a button is released what the last state of the button was.

  - sensor:
      name: "Button 1 Sensor"
      unique_id: "Button_1_sensor"
      state_topic: "meraki/v1/mt/L_someNumber/ble/someMAC/buttonReleased"
      value_template: "{{value_json.action }}"
      device: {
          identifiers: [
              "Button 1"
          ],
          name: "Button 1",
          manufacturer: "Cisco Meraki",
          model: "MT30"
      }

This data does is enclosed in double quotes. So I feel like that probably is the issue. If anyone has any idea how I might be able to get around this problem I’d love to hear it.

{
  "ts": "2024-12-08T00:56:33Z",
  "id": 0,
  "action": "shortPress",
  "pressDuration": 0.2,
  "units": "s",
  "sequenceNumber": 57
}

I ended up getting this to work, my final config file ended up looking like this

  - sensor:
      name: "Button 1 Sensor"
      unique_id: "Button_1_sensor"
      state_topic: "meraki/v1/mt/L_someNumber/ble/someMAC/buttonReleased"
      value_template: "{{value_json.action }}"
      device: {
          identifiers: [
              "Button 1"
          ],
          name: "Button 1",
          manufacturer: "Cisco Meraki",
          model: "MT30"
      }
  - sensor:
      name: "Pool Temperature Sensor"
      state_topic: "meraki/v1/mt/L_someNumber/ble/someMAC/temperature"
      device_class: "temperature"
      unit_of_measurement: '°F'
      value_template: "{{value_json.fahrenheit }}"
      unique_id: "pool_temperature"
      device: {
          identifiers: [
              "Pool Temperature Sensor"
          ],
          name: "Pool Temperature Sensor",
          manufacturer: "Cisco Meraki",
          model: "MT11"
      }
  - sensor:
      name: "Refrigerator Temperature Sensor"
      state_topic: "meraki/v1/mt/L_someNumber/ble/someMAC/temperature"
      device_class: "temperature"
      unit_of_measurement: '°F'
      value_template: "{{value_json.fahrenheit }}"
      unique_id: "refrigerator_temperature"
      device: {
          identifiers: [
              "Refrigerator Temperature Sensor"
          ],
          name: "Refrigerator Temperature Sensor",
          manufacturer: "Cisco Meraki",
          model: "MT11"
      }

If I’m being honest I’m not sure how this is different, perhaps there was a typo in the state_topics somewhere, or potentially the MAC address was case sensetive?