jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
5.26k stars 580 forks source link

Make Home Assistant discovery prefix configurable #3113

Open MintBlueJelly opened 2 weeks ago

MintBlueJelly commented 2 weeks ago

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.

henrythasler commented 2 weeks ago

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 commented 2 weeks ago

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:

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.