MQTT broken connection after update

Hi all,
I just updated my home assistant to the newest version 2023.3.4 and realized that mqtt connection no longer works. I also reinstalled mqtt to the latest version, but it didn’t help me at all. Here is the log which occurred after restarting mqtt component:

 2023-03-14 15:00:08.670 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.1.111 for mqtt
File "/usr/src/homeassistant/homeassistant/components/mqtt/__init__.py", line 369, in async_setup_entry
mqtt_data.client = MQTT(hass, entry, conf)
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 336, in __init__
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 361, in init_client
self._mqttc = MqttClientSetup(self.conf).client
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 240, in __init__
import paho.mqtt.client as mqtt # pylint: disable=import-outside-toplevel
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 72, in <module>
self._sub_state = await self._mqtt_client.subscribe(self._sub_state, topics)
File "/usr/local/lib/python3.10/site-packages/hatasmota/mqtt.py", line 106, in subscribe
File "/usr/src/homeassistant/homeassistant/components/mqtt/subscription.py", line 133, in async_subscribe_topics
File "/usr/src/homeassistant/homeassistant/components/mqtt/subscription.py", line 60, in subscribe
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 164, in async_subscribe
homeassistant.exceptions.HomeAssistantError: Cannot subscribe to topic 'tasmota/discovery/#', MQTT is not enabled
2023-03-14 15:03:40.643 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.1.111 for mqtt
File "/usr/src/homeassistant/homeassistant/components/mqtt/__init__.py", line 369, in async_setup_entry
mqtt_data.client = MQTT(hass, entry, conf)
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 336, in __init__
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 361, in init_client
self._mqttc = MqttClientSetup(self.conf).client
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 240, in __init__
import paho.mqtt.client as mqtt # pylint: disable=import-outside-toplevel
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 72, in <module>
File "/usr/src/homeassistant/homeassistant/components/mqtt/config_flow.py", line 287, in async_step_broker
File "/usr/src/homeassistant/homeassistant/components/mqtt/config_flow.py", line 746, in try_connection
import paho.mqtt.client as mqtt # pylint: disable=import-outside-toplevel
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 72, in <module>
2023-03-14 15:05:27.394 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.1.111 for mqtt
File "/usr/src/homeassistant/homeassistant/components/mqtt/__init__.py", line 369, in async_setup_entry
mqtt_data.client = MQTT(hass, entry, conf)
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 336, in __init__
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 361, in init_client
self._mqttc = MqttClientSetup(self.conf).client
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 240, in __init__
import paho.mqtt.client as mqtt # pylint: disable=import-outside-toplevel
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 72, in <module>
2023-03-14 15:06:32.627 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.1.111 for mqtt
File "/usr/src/homeassistant/homeassistant/components/mqtt/__init__.py", line 369, in async_setup_entry
mqtt_data.client = MQTT(hass, entry, conf)
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 336, in __init__
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 361, in init_client
self._mqttc = MqttClientSetup(self.conf).client
File "/usr/src/homeassistant/homeassistant/components/mqtt/client.py", line 240, in __init__
import paho.mqtt.client as mqtt # pylint: disable=import-outside-toplevel
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 72, in <module>

Same issue here. MQTT not working after upgrade.

Got it working:
Apparently the mqtt configuration.yaml representation is changed.

Manually configured MQTT sensor(s) found under platform key ‘sensor’, please move to the mqtt integration key, see MQTT Sensor - Home Assistant

Before:

sensor:
     - platform: mqtt
       state_topic: "home/bedroom/temperature"
       unit_of_measurement: "°C" 

Now:

 mqtt:
   sensor:
     - state_topic: "home/bedroom/temperature"
         unit_of_measurement: "°C"