Devices unavailable on Home Assistant restart


It seems like whenever I restart Home Assistant all my devices are marked as Unavailable. I can still see them being pinged, but /availability topics are not updated. I also have birth/will messages set in home-assistant and can even trigger them from my handy desktop client - those don’t seem to make zigbee2mqtt publish updates to availability either.

I don’t have blacklist/whitelist specified in the config.

Running 1.13.1 and also tried today’s latest-dev docker image, whatever version this is representing. Should I submit a ticket or am I doing something wrong?


Add this to configuration.yaml : (the one of HA :slight_smile: )

    topic: 'hass/status'
    payload: 'online'
    topic: 'hass/status'
    payload: 'offline'  

I do have that in my config. I see state of those devices being announced (with debug mode on), but what is missing is their availability topics are not posted.

And that is why you need to add these lines to your HA configuration.yaml. So zigbee2mqtt gets notified that HA is restarting and can send the availability topics when HA is ready.

Yes, yes, as I have said in my original message I have had those lines in my HA config since the very beginning. I can see those topics being updated correctly in MQTTfx desktop client and I even see zigbee2mqtt react to it - problem is HOW it reacts: it sends state updates (is the light on/off etc) but not updating the availability topics. This makes all MQTT devices greyed out in Home Assistant until I manually restart zigbee2mqtt - upon restart it correctly updates the availability topics.

For those who come here from google, I have created an issue in github.