Tasmota > MQTT > HA - 1 value (of 6) is missing in HA

Hello everyone,

I’m running into a bit of an issue (likely a small one for you experts) regarding MQTT.

I have a Wemos D1 flashed with Tasmota that collects various values from my heating system:

  • 2 temperature values for the heating circuit
  • 2 temperature values for the hot water circuit
  • A distance value for the oil tank level
  • A “switch” that monitors burner malfunctions

The last item—the burner malfunction switch—is the one giving me trouble.
In Tasmota, this switch only appears in the logs, not in the UI (which is fine by me).
The value appears correctly in the JSON payload sent via MQTT; for example, it shows "Switch1": "ON".
I have verified this using MQTT Explorer.
The Wemos D1 also shows up correctly in the Home Assistant Tasmota integration.

The Problem:
In Home Assistant, all values are displayed except for this specific switch.
I’m a bit stuck on how to get it to show up.

I added the following to my configuration.yaml:

mqtt:
binary_sensor:
- name: “Heizöltank Stoerung”
state_topic: “Heizoeltank/tele/sensor”
value_template: “{{ value_json.Switch1 }}”
payload_on: “on”
payload_off: “off”
device_class: “power” # Optional: Zeigt Blitz-Icon für Strom an
unique_id: “heizoeltank_switch_1” # Wichtig für die UI-Bearbeitung
device:
identifiers: “Heizoeltank” # Einmaliger Name für das Gerät
name: “Heizoeltank”
model: “ESP8266 mit Tasmota”
manufacturer: “Tasmota”

The state_topic matches what I see in MQTT Explorer.
Besides the sensor path, I could also use the path Heizoeltank/stat/STATUS10 (though I haven’t tested that yet).
I cannot (and would rather not) manually simulate a burner malfunction just for testing.

Despite adding the entry in the configuration, nothing has changed regarding the entities shown for the Tasmota device.
The state of “Switch1” is still not visible, so I can’t set up any automations for it.

I would really appreciate any input or tips on what I might be doing wrong.

Thanks a lot in advance!
Best regards, Martin

If it reports the value as ON or OFF (all uppercase) then the values for the following two options are incorrect (all lowercase).

payload_on: "on"
payload_off: "off"

Change the values to uppercase then execute “Reload Manually configured MQTT entities”.

Changed it and reloaded HA, thank you very much for your input.

But what should happen then?
Do I have to “map” the Switch1 to a helper, is there a new entity coming up after reload ??

Got it, found it as new device under the MQTT integration.
Thank you!!

But now, I have the question, why the value is shown as “Unknown” ?
Shouldnt it not like “ON” or “OFF”?

How frequently is the MQTT topic Heizoeltank/tele/sensor updated?

Whenever a value is published to that topic, the binary_sensor’s state should report On or Off.

If it does not, please post the complete JSON payload that is published to the topic.

Depends on how often the temperature changes.
The Switch1 itself (hopefully) never changes, otherwise my heating system is broken :wink:

That is not happening. Due to the other values, changes coming, thats fact.
But the value “Unknown” is not changing in the binary.sensor.

Here is the complete JSON, copied out of MQTT Explorer:

{“Time”:“2026-02-07T17:45:24”,“Switch1”:“OFF”,“DS18B20-1”:{“Id”:“1B38EE086461”,“Temperature”:46.9},“DS18B20-2”:{“Id”:“575EEB086461”,“Temperature”:46.4},“DS18B20-3”:{“Id”:“6151EB086461”,“Temperature”:43.3},“DS18B20-4”:{“Id”:“BF3BEB086461”,“Temperature”:47.6},“SR04”:{“Distance”:86.7},“TempUnit”:“C”}

{“Time”:“2026-02-07T17:53:14”,“Switch1”:“OFF”,“DS18B20-1”:{“Id”:“1B38EE086461”,“Temperature”:44.4},“DS18B20-2”:{“Id”:“575EEB086461”,“Temperature”:44.7},“DS18B20-3”:{“Id”:“6151EB086461”,“Temperature”:40.4},“DS18B20-4”:{“Id”:“BF3BEB086461”,“Temperature”:45.6},“SR04”:{“Distance”:88.1},“TempUnit”:“C”}

I really appreciate your help, thank you!

I used the following MQTT Binary Sensor configuration on my system:

mqtt:
  binary_sensor:
    - name: "Heizöltank Stoerung"
      state_topic: "Heizoeltank/tele/sensor"
      value_template: "{{ value_json.Switch1 }}"
      unique_id: "heizoeltank_switch_1"
      device_class: "power"
      device:
        identifiers: ["Heizoeltank"]
        name: "Heizoeltank"
        model: "ESP8266 mit Tasmota"
        manufacturer: "Tasmota"

After reloading, the resulting entity is binary_sensor.heizoltank_stoerung and its initial state value is unknown.

I used MQTT Explorer to publish the following JSON payload to the Heizoeltank/tele/sensor topic.

Click to reveal JSON payload
{
  "Time": "2026-02-07T17:45:24",
  "Switch1": "OFF",
  "DS18B20-1": {
    "Id": "1B38EE086461",
    "Temperature": 46.9
  },
  "DS18B20-2": {
    "Id": "575EEB086461",
    "Temperature": 46.4
  },
  "DS18B20-3": {
    "Id": "6151EB086461",
    "Temperature": 43.3
  },
  "DS18B20-4": {
    "Id": "BF3BEB086461",
    "Temperature": 47.6
  },
  "SR04": {
    "Distance": 86.7
  },
  "TempUnit": "C"
}

The binary_sensor correctly reported off.


The main difference between my configuration and yours is that I removed the payload_off and payload_on options. Their default values are OFF and ON respectively so there’s no need to include them.

From the documentation:

Hm, strange… :thinking:
I tried to follow you along.
Removed payload_off and payload_on from my configuration.yaml.
Then copied the JSON to the clipboard, navigate to "Heizoeltank/tele/sensor" in the MQTT Explorer and published the pasted JSON.

But the binary_sensor.heizoeltank_heizoltank_stoerung did not changed the value :worried:

I hesitate to state the obvious but you are doing something differently because I have proven that it does work. The challenge now is to determine what exactly you are doing differently.

First, check Logs for any associated warnings or errors.

  1. Is that a misprint or does the word heizoeltank actually appear twice in its entity_id?

  2. Double-check the topic’s spelling. Confirm it is actually Heizoeltank/tele/sensor and is not misspelled.

Oh man, you are right.
The binary sensor is copied directly out of HA and it is not a misprint.
But I dont understand, where it comes from.
The binary sensor is configured in the configuration.yaml, right?
The Heizoeltank/tele/sensor is confirmed.

Here again the complete mqtt-section of my configuration.yaml:
I need two binary sensors, since I need to watch for two heating systems.
But I cannot see, where the double appearance is coming from, nor where I can change it.


mqtt:
  binary_sensor:
    - name: "Heizung LF Stoerung"
      state_topic: "Heizung-LF/tele/sensor"
      value_template: "{{ value_json.Switch1 }}"
      device_class: "power"
      unique_id: "heizung_switch_1"
      device:
        identifiers: "Heizung-LF"
        name: "Heizung-LF Störung"
        model: "ESP8266 mit Tasmota"
        manufacturer: "Tasmota"

    - name: "Heizöltank Stoerung"
      state_topic: "Heizoeltank/tele/sensor"
      value_template: "{{ value_json.Switch1 }}"
      device_class: "power"
      unique_id: "heizoeltank_switch_1"
      device:
        identifiers: ["Heizoeltank"]
        name: "Heizoeltank"
        model: "ESP8266 mit Tasmota"
        manufacturer: "Tasmota"

Changed the name of the binary sensor via the HA UI to binary_sensor.heizoltank_stoerung.
But the value is not changing

Now it works.
Changed one of the switch names to switch2.
Deleted both MQTT entries and reloaded HA and now I have it working.

Thank you @Taras for your input and help :pray: