I am trying get a sensor to work via MQTT Discovery. I have published MQTT messages (examples below) and HA seems to discover it, but the temperature is not updated. Do I need more fields populated?
Pasted from developer-tools/mqtt…
Message 8 received on homeassistant/sensor/inkbird_f8300232744d/config/temperature1 at 8:41 PM: { "name": "temperature1", "device_class": "temperature", "state_topic": "inkbird_f8300232744d/state", "unit_of_measurement": "°C", "value_template": "{{value_json.temperature}}" }
QoS: 0 - Retain: true
Message 21 received on inkbird_f8300232744d/state at 8:50 PM: { "temperature1": 6552.6, "temperature2": 6552.6, "temperature3": 6552.6, "temperature4": 6552.6, "temperature5": 6552.6, "temperature6": 23 }
QoS: 0 - Retain: false
It’s also possible to have the entire raw JSON payload appear in the sensor’s state. However, an entity’s state is limited to storing 255 characters. If the received payload exceeds this length, none of it is stored. In contrast, there’s no length restriction for attributes.
Not quite there, I have published 2 (or more) configs and my entity in home assistant seems to be a combination of the first and last configs. For the config messages below, I get a single entity in HA with,
Name: inkbird_f8300232744d_temperature2
Entity ID: sensor.inkbird_f8300232744d_temperature1