Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Home Assistant discovery prefix configurable #3113

Open
MintBlueJelly opened this issue Jun 14, 2024 · 2 comments
Open

Make Home Assistant discovery prefix configurable #3113

MintBlueJelly opened this issue Jun 14, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@MintBlueJelly
Copy link

The Feature

Right now, the Homeassistant Discovery (using MQTT) uses the hard-coded discovery prefix "homeassistant". While this works with the HA MQTT integration with default settings, it will invariably fail when the discovery prefix has been customized to anything else (e.g. to "ha").

To fix this, please make the discovery prefix configurable and expose it as a new input field in the "Homeassistant Discovery (using MQTT)" section of the settings page.

@MintBlueJelly MintBlueJelly added the enhancement New feature or request label Jun 14, 2024
@henrythasler
Copy link
Contributor

I wonder if changing the discovery prefix is something a lot of people do on their setup or if that is some <1% super-rare edge-case. Maybe you could explain your motivation for requesting that feature.

@MintBlueJelly
Copy link
Author

I can't comment on statistics, since I don't have the numbers. But I would tend to agree that it's fair to assume that customizing the discovery prefix is not something most users will do. Having said that, there are good reasons for making the discovery prefix configurable:

  • The formal argument: The HA discovery prefix is designed to be customizable and documented as such. Solutions implementing HA MQTT Discovery should adhere to this design as a matter of course because otherwise they end up as partially incompatible.
  • The practical argument: Prefix customization is required in any environment running multiple instances of Home Assistant with a shared MQTT broker (e.g. dedicated TEST/PROD instances). While it's possible to also have dedicated TEST/PROD instances of the MQTT broker, using a shared broker is more efficient.

In short, I believe following established examples (e.g. Zigbee2MQTT) and fully supporting discovery prefix customization would benefit not just my particular setup but this project as a whole.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants