MQTT devices unavailable after MQTT integration restart

As described in the title. If I restart / reload the MQTT integration or restart the whole Home Assistant, all devices / entities that are integrated via MQTT are not available in HA.

I come from a HA Docker container version back to HAOS. If I have observed it correctly, the problem only occurs since switching to HAOS.

I use Mosquitto as MQTT broker in a docker container.

The solutions in this older post marked as solved are no longer valid or do not work.

https://community.home-assistant.io/t/zigbee2mqtt-device-unavailable-after-ha-restart/166413

mqtt:
  discovery: true
  broker: 192.168.x.x
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'

bitrh_meaasge is no longer allowed in configuration.yaml

Sending

action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - service: mqtt.publish
    data:
      topic: hass/status
      payload: online

do not solve the issue.

Can someone point me to the actual solution of this problem?

Settings → Devices & Services → MQTT → Configure → Reconfigure MQTT → second page

afbeelding

@francisp Thanks for showing me this options in the integration.

It seems that this solves a part of the problem.

All entities of the HUE bulbs and contact sensors (except all update.domain entities) are now back after HA reboot.

But the curtain motors and the vaccum robot with valetudo stays unavailable.

Any additional idea?

I have tested around a bit these days and installed the MQTT explorer add-on to understand a bit more of MQTT.

I also moved from my Docker MQTT-Broker to the HA add-on Broker.

After the last HA restarts all the Z2M and frigate devices/entities are coming back. Only the Valetudo robot not or with some delay. I will make some more research to this.