Multiple MQTT discovery_prefix

In those days where MQTT tends to become central in a home automation system, I suddenly realize you can only specify a single discover_prefix and, worse, afaict, you can only connect to a single MQTT broker.

As far as discover_prefix goes, a bunch of systems willing to integrate with HA use MQTT and the discovery mechanisms. You probably can override their setup for the root topic, but there’s no guarantee, and furthermore, intermingling discovery from various sources seem messy to me.

A messy workaround could have been to declare multiple time the same broker, but it looks only one is allowed as well, which is likely a limitation that will bite some at one point or another, imho.

This request to enable support for multiple discovery_prefix, then.

+1

Supporting multiple discovery prefixes can be very helpful for example the follwing setting:

We have a house with two apartments.
It is owned by the family and my dad is living in the second apartment.

I want to provide him some smart home features too.
But for security reasons there are multiple data scopes in mqtt:

  • Accessible for both
  • Accessible by only one apartment

If you can add multiple discovery prefixed, both home assistant instances can use the “global” data but each instance can use there own data exclusively.

Not sure if it is a very easy or a difficult request because of possible duplicated device names.

Thanks a lot to all contributers at HA.

Kind regards,
Daxi