MQTT Integration help needed

I just upgraded from 2022.8.1 to 2022.12.8. I have an number of MQTT devices (shellies and tasmota switches) that were all working fine prior to the update.

I received this error: “Please move the configuration to the mqtt integration key and restart Home Assistant to fix this issue.”

Below is an example switch that I need to port to the new mqtt integration.

switch:
  - platform: mqtt
    name: "Tasmota 130"
    state_topic: "stat/tasmota130/POWER"
    command_topic: "cmnd/tasmota130/POWER"
    availability_topic: "tele/tasmota130/LWT"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"

Below is my attempt to use the new integration, but it isn’t working. What am I missing?

mqtt:
  switch:
    - unique_id: Tasmota_130
      name: "Tasmota 130"
      state_topic: "stat/tasmota130/POWER"
      command_topic: "cmnd/tasmota130/POWER"
      availability:
        - topic: "tele/tasmota130/LWT"
      payload_on: "ON"
      payload_off: "OFF"
      state_on: "ON"
      state_off: "OFF"
      optimistic: false
      qos: 0
      retain: true
      payload_available: "Online"
      payload_not_available: "Offline"

for sure available and unavailable payload must be moved under availability: topic. refer documentation for proper naming

You are correct, I fixed that, but still no change. When I look in the mosquitto logs, I don’t see any errors. I can actually see connections coming in from all of my mqtt devices. When I go into the device settings, under "Listen to topic, I can listen to the # wildcard topic and see all of the traffic moving through.

So why won’t my devices work? Any help would be appreciated.
It’s frustrating that everything worked fine before I updated HA. Everything changed for MQTT and completely broke my MQTT. Why???

where your snippet is coming from? is it from configuration.yaml or included file?

The format for configuring MQTT entities in YAML was changed in June (version 2022.6.0). It was also announced that there would be a grace period for the old format and it would be supported until September.

When you skip several versions, it’s important to read the Breaking Changes section of the Release Notes for each version you skip. For example, if you skipped version 2022.6.0 when you upgraded to 2022.8.1, you still needed to read its Release Notes (where you would have seen the screenshot I posted above, warning you of the breaking change).


Is there a particular reason you are manually configuring this device as opposed to using the Tasmota integration (to automatically discover it)?

Thank you, I’ve reverted back to the old version and started making the MQTT updates to the new format. For some reason updating and then making the changes, MQTT was completely hosed.

I didn’t used the Tasmota integration b/c I had just originally set it up manually. Seems like a couple years ago, I didn’t realize there was a Tasmota integration.

For the update - would you recommend I update incrementally rather than skipping over multiple updates?