MQTT + Discovery + Remove disconnected device

Hello!
I’ve been using MQTT + Discovery to auto add new devices, which works well enough.

But I want these devices, e.g. a switch, to disappear from HA when the device is offline.

Is there a way to do this? To “undiscover”?
Thanks!

I have two HA running and I tried MQTT Eventstream which added and removed entities on a HA slave. I don’t use it because it removed entities if they are not used for a period of time. It might fit your needs if your MQTT topics can act as the master…

Hi RobDYI, i understand that i need to create a mqtt sub / pub for my first Hass server, but what should i do for the second Hass server to send mqtt commands to my second Hass server?

I hope i can creat a HASS failover server for optimum availability.

Hope you can give me som ideas.

I seached the forum and found this

1 Like