MQTT and sensor definitions in Configuration.yaml

I have several computers sending MQTT messages to my HA Pi. Up until today 16 MQTT sensors defined in the Configuration.yaml were working as expected (yellow highlighted areas attached screen shot). Here are the entries in the Configuration.yaml.

# Loads default set of integrations. Do not remove.  
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
# Configuration.yaml entry for MQTT SolarWH sensors.
mqtt:
  sensor:
    - name: "Solar time"
      unique_id: Furnace_Time_Obs
      state_topic: "Solar/Panel"
      value_template: "{{ value_json['Date'] }}"
      #device_class: timestamp
      #state_class: measurement

    - name: "Solar Panel Up"
      unique_id: Solar_Panel_Up
      state_topic: "Solar/Panel"
      value_template: "{{ value_json['Panel Up'] }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "Solar Panel Down"
      unique_id: Solar_Panel_Dwon
      state_topic: "Solar/Panel"
      value_template: "{{ value_json['Panel Down'] }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "Electric WH"
      unique_id: Furnace_Elec_WH
      state_topic: "Solar/Water"
      value_template: "{{ value_json['Electric WH'] }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "Cold Water"
      unique_id: Furnace_ColdWater
      state_topic: "Solar/Water"
      value_template: "{{ value_json['Cold Water'] }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "Solar WH"
      unique_id: Furnace_Solar_WH
      state_topic: "Solar/Water"
      value_template: "{{ value_json['Solar WH'] }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"
      
# Configuration.yaml entry for MQTT Acurite sensors.
    - name: "Yard Temperature"
      unique_id: yard_temperature
      state_topic: "Acurite/Yard"
      availability_topic: "Acurite/Yard"
      value_template: "{{ value_json['Temp Yard'] }}"
      availability_template: "{{ 'offline' if value_json['Temp Yard'] == -40.0 else 'online' }}"      
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "Yard Wind Speed"
      unique_id: yard_wind_speed
      state_topic: "Acurite/Yard"
      value_template: "{{ value_json['Wind Yard'] }}"
      device_class: wind_speed
      state_class: measurement
      unit_of_measurement: "km/h"
      
    - name: "Front Door Temperature"
      unique_id: front_door_temperature
      state_topic: "Acurite/House"
      availability_topic: "Acurite/House"
      value_template: "{{ value_json['Front Door'] }}"
      availability_template: "{{ 'offline' if value_json['Front Door'] == -40.0 else 'online' }}"      
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "Living Room Temperature"
      unique_id: living_room_temperature
      state_topic: "Acurite/House"
      availability_topic: "Acurite/House"
      value_template: "{{ value_json['Living Room'] }}"
      availability_template: "{{ 'offline' if value_json['Living Room'] == -40.0 else 'online' }}"      
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "House Humidity"
      unique_id: house_humidity
      state_topic: "Acurite/House"
      value_template: "{{ value_json['Humidity'] }}"
      device_class: humidity
      state_class: measurement
      unit_of_measurement: "%"

    - name: "Patio Time"
      unique_id: patio_time
      state_topic: "Acurite/Patio"
      value_template: "{{ value_json['Time'] }}"

    - name: "Patio Temperature"
      unique_id: patio_temperature
      state_topic: "Acurite/Patio"
      value_template: "{{ value_json.Temperature | round(1)}}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "Patio Humidity"
      unique_id: patio_humidity
      state_topic: "Acurite/Patio"
      value_template: "{{ value_json['humidity'] }}"
      device_class: humidity
      state_class: measurement
      unit_of_measurement: "%"

    - name: "Patio Wind Speed"
      unique_id: patio_wind_speed
      state_topic: "Acurite/Patio"
      value_template: "{{ value_json.wind | float | round(0) }}"
      device_class: wind_speed
      state_class: measurement
      unit_of_measurement: "km/h"
      
    - name: "Patio Rain, today"
      unique_id: patio_rain
      state_topic: "Acurite/Patio"
      value_template: "{{ value_json['rain'] }}"
      device_class: precipitation
      state_class: measurement
      unit_of_measurement: "mm"

Today I configured a new computer to send temperature information from our furnace:

# Configuration.yaml entry for MQTT furnace sensors.
    - name: "Furnace Time"
      unique_id: furnace_time
      state_topic: "Furnace/Water"
      value_template: "{{ value_json['Time'] }}"

    - name: "Boiler Temperature"
      unique_id: boiler_temperature
      state_topic: "Furnace/Water"
      value_template: "{{ value_json['Boiler'] }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "Living Room Return"
      unique_id: livingroom
      state_topic: "Furnace/Water"
      value_template: "{{ value_json['LivingRoom'] }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

    - name: "Diningroom Return"
      unique_id: diningroom
      state_topic: "Furnace/Water"
      value_template: "{{ value_json['DiningRoom'] }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"
      
    - name: "Upstairs Return"
      unique_id: upstairs
      state_topic: "Furnace/Water"
      value_template: "{{ value_json['UpStairs'] }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

Here are the entries in the MQTT Explorer:

Acurite
Patio = {"Time": "2026-09-19 16:49", "Temperature": 26.9, "humidity": 59.0,"wind": 5.0, "rain": 0.0}
Yard = {"Temp Yard": 33.3333333333, "Wind Yard": 0.2, "Temp By Pool": -40.0}
House = {"Front Door": 28.2, "Living Room": 24.1 , "Humidity": 57.0
Furnace
Water = {"Time": 2026-09-19 16:54, "Boiler": 24.437, "LivingRoom": 24.875 , "DiningRoom": 24.312, "UpStairs": 25.062}
Solar
Panel = {"Date": "2026-09-19 16:52", "Panel Down": 54.062 , "Panel Up": 50.187}
Water = {"Electric WH": 56.0, "Solar WH": 54.5 , "Cold Water": 21.625}

The furnace sensors are not being processes and is shown in the attched


screen shot - red area.

Can someone spot my error, I’ve looked without success. Thanks…RDK

    - name: "Upstairs Return"
      unique_id: upstairs
      state_topic: "Furnace/Water"
      value_template: "{{ value_json.UpStairs }}"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"

If the state topic is correct then try above code.

Troubleshooting MQTT? MQTT-Explorer can help you be successful!
If you have Apps available, try adding this App repository to your Apps list: GitHub - hassio-addons/app-mqtt-explorer: Explore the topics and messages on your MQTT broker. · GitHub

With this you can see that the broker sees and likely find the bug.

HINT: I have found using this, if you look at the JSON string and it is in color, the JSON is valid. If it is monochrome, the JSON is invalid and it will not work.

I have the MQTT_Explorer. The display characters in the left panel are black on a white background, for both those that are working and the one not working. If I expand the values for Furnace/Water in the right panel then the codes are black on a colored background.

I don’t see any format differences between those working and those not working??? Thanks…RDK

I will try your format (value_template: “{{ value_json.UpStairs }}”), but the one I’m using (value_template: “{{ value_json[‘UpStairs’] }}”) is working for all the rest. Why should this format work differently? Thanks…RDK

Please post a screenshot of MQTT Explorer displaying the payload for the Furnace/Water topic.

The MQTT_Explorer data are shown in the original post…

I made those changes (value_template: “{{ value_json.UpStairs }}”)
No effect :frowning:

A screenshot please.

I’ve made some changes since I originally post this issue:
I noticed that the sensor name for the “Furnace” time was not what I coded in the configuration, ie “Time” and not “Furnace Time” as coded in the Configuration.yaml. One can also see this in the attached screen shot from the original posting:

    - name: "Furnace Time"
      unique_id: furnace_time
      state_topic: "Furnace/Water"
      value_template: "{{ value_json['Clock'] }}"

I also noticed that there were two “Time” elements in my MQTT data, one for the"Patio" and one for the “Furnace”. Thinking that maybe that was confusing the issue, I changed the "Furnace one to “Clock”. This change had no effect on the getting the “Furnace” data into my HA display and all the other still work. And the mis-named Furnace time entry is still “Time”.

Also attached is a screen shot of the MQTT_Explorer. Thanks…RDK

Just checking, each time you change yaml that you are going into settings/tools and reloading the mqtt entities?

Issue fixed, dumb error. Time/data field was not enclosed in double quotes. Data now being displayed. Still don’t understand why the name is “Time” and not “Furnace Time”. Thanks…RDK

Yes, thanks

Thanks, that’s what I wanted in order to compare the payload you had posted as text to the actual payload as it appears in the screenshot. Why? To confirm the published payload for Furnace/Water is exactly what you had posted.

Your post shows:
"Time": 2026-09-19 16:54
but the screenshot shows:
"Clock": 2026-09-22 08:00

Those are two different key names (and both lack quotation marks for their payload). The lack of quotation marks instantly makes it invalid JSON and explains why all Template Sensors report Unknown.

The payload contains Clock instead of Time so it will cause this template, for Furnace Time, to fail to report the time:

value_template: "{{ value_json['Time'] }}"
                                ^^^^

Thanks. As I reported in my “Accept Solution” post, some time and several changes happened between the time of my initial posting of the screen shot of the entities and when I posted the screen shot of the MQTT_Explorer. Including changing "Time"in the MQTT payload to “Clock”, as I searched for my error.

Thanks anyway for your time and comments…RDK

Then I assume you have already corrected the template in the Furnace Time template sensor.


BTW, MQTT Explorer indicates if the payload is invalid JSON (the “X” icon).

The “X” icon disappears when the time string is wrapped in double-quotes.

image