-
-
Notifications
You must be signed in to change notification settings - Fork 96
[feat] Do not automatically add HA discovery data upon include #465
Comments
I think I could add an option like Usually I suggest to don't enable gateway once your entire configuration is ok to avoid this kind of issues |
Maybe I have explained it wrong, with |
@robertsLando I had some of these thoughts too, as this issue has. I resigned myself to just cleaning up in MQTT on renaming, but my comment can actually apply here too. If the default was to not do discovery, a button could instead be added to actually do it (push it to MQTT). |
I don’t use the location names for the topics and enjoy the fact that it automatically discovers when I add a new device. Just an alternative voice :) |
I'm about to add a whole pile of devices to my z-wave network, and would like to have them have somewhat sane names on the HA side. One idea would be to add an additional configuration option, basically "only send hass discovery if node has a name". If you have "use node names" AND "hass discovery" AND the new "only discover named nodes" enabled, the discovery will be created once the node gets a name, but not before. @robertsLando what do you think? I'm happy to put together a PR for this if that sounds like a useful approach. |
@vvuk I would be happy to review a PR for this. Anyway I suggest to add new features to: https://github.com/zwave-js/zwavejs2mqtt. That will be the future of this project. I will continue maintain this but would like to add features there and only fix bugs here. If you are asking for a 'why?' : https://github.com/zwave-js/zwavejs2mqtt#why-zwavejs |
Is your feature request related to a problem? Please describe.
When you include a node, the node gets a id number. Eg. NodeID_16
If HASS Discovery is true, this entity will get written to MQTT as NodeID_16 the same instance it is included.
If you later change the name of the device in zwave2mqtt (or location) a new MQTT discovery topic is posted.
This results in a lot of manual cleaning of MQTT.
Describe the solution you'd like
Alternative 1: A question after include. "Do you want to send Home Assistant MQTT Discovery topics?"
Alternative 2: Simply, do not send the topics. One have to manually request it, which is already available
Alternative 3: Clean up MQTT. If a node name changes, rename it and delete the old entries in MQTT, including the HASS Discovery topics
Describe alternatives you've considered
One could disable the "HASS Discovery" temporarily, include, change name, enable again, and press the "re-discover device"
But it is ease to forget this every time.
The text was updated successfully, but these errors were encountered: