MQTT binary sensors: one of two does not show up as entity

I am trying to define two MQTT binary sensors which will get the data from an external source. I have added the configuration in the configuration.yaml file in the config directory.
The first sensor (Vloerverwarming woonkamer) is not visible as entity in HA, the second one (Verwarming Woonkamer) is. As far as I can see, the definitions are equal… (see below). Probably i do something wrong, who can help me in the right direction…? By the way, the sensor ‘CPU temp’ works well and also the switches after the binary sensors…

Thanks a lot!


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

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

# Example configuration.yaml entry

sensor:
    - platform: command_line
      name: CPU Temp
      command: "cat /sys/class/thermal/thermal_zone0/temp"
      unit_of_measurement: "°C"
      value_template: "{{ value | multiply(0.001) | round(1) }}"

mqtt:
  binary_sensor:
    - name: "Vloerverwarming Woonkamer"
      state_topic: "CV-HAS-48-3F-DA-77-9E-89/woonkamer/vloerverwarming/"
      unique_id: CV-HAS-48-3F-DA-77-9E-89-1
      qos: 0
      payload_on: "ON"
      payload_off: "OFF"
      device_class: heat

    - name: "Verwarming Woonkamer"
      state_topic: "CV-HAS-48-3F-DA-77-9E-89/woonkamer/verwarming/"
      unique_id: CV-HAS-48-3F-DA-77-9E-89-2
      qos: 0
      payload_on: "ON"
      payload_off: "OFF"
      device_class: heat

  switch:
    - name: "Verwarming schakelen"
      unique_id: CV-HAS-48-3F-DA-77-9E-89-verwarming-switch
      state_topic: "CV-HAS-48-3F-DA-77-9E-89/woonkamer/verwarming/"
      command_topic: "CV-HAS-48-3F-DA-77-9E-89/woonkamer/verwarmingIn/"
      availability:
        - topic: "CV-HAS-48-3F-DA-77-9E-89/woonkamer/verwarmingstat/"
          payload_available: "ON"
          payload_not_available: "OFF"
      payload_on: "ON"
      payload_off: "OFF"
      state_on: "ON"
      state_off: "OFF"
      optimistic: false
      qos: 0
      retain: true

    - name: "Vloerverwarming schakelen"
      unique_id: CV-HAS-48-3F-DA-77-9E-89-vloerverwarming-switch
      state_topic: "CV-HAS-48-3F-DA-77-9E-89/woonkamer/vloerverwarming/"
      command_topic: "CV-HAS-48-3F-DA-77-9E-89/woonkamer/vloerverwarmingIn/"
      availability:
        - topic: "CV-HAS-48-3F-DA-77-9E-89/woonkamer/vloerverwarmingstat/"
          payload_available: "ON"
          payload_not_available: "OFF"
      payload_on: "ON"
      payload_off: "OFF"
      state_on: "ON"
      state_off: "OFF"
      optimistic: false
      qos: 0
      retain: true

I started a couple of days ago to update my config file with the latest formats. I updated my mqtt binary sensors to the new format and I have the same issue. Only the first sensor is visible. A strange thing is that I can see the sensor and it’s updates in the first place, if I refresh the browser the sensor is gone.
@AddyK did you manage to figure it out?

LE: I am up to date on versions
LE2: I managed to find the source of my problem, I had a duplicate line “binary_sensor”. The editor was reporting this via the exclamation mark in the right corner but who noticed. :grimacing:

Hi Bogdan

This were two S20 switches from Sonoff. At the end, i flashed them with Tasmota and use the Tasmota integration to get all the data. That works great! With MQTT commands you can read specific parameters and set them.

Addy