logo elektroda
logo elektroda
X
logo elektroda

openBeken: Is there a reverse function for assistant discovery?

Honsu 138 2
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21400817
    Honsu
    Level 3  
    There is an assistant discovery function on the openBeken platform. Is there a function that reverses this process?
  • ADVERTISEMENT
  • #2 21401871
    p.kaczmarek2
    Moderator Smart Home
    Is such a thing even possible? Rather, it is on the Home Assistant side that you can remove a discovered device.
    Helpful post? Buy me a coffee.
  • #3 21404131
    Honsu
    Level 3  
    >>21401871 .
    Consideration could be given to adding such functionality.

    https://resinchemtech.blogspot.com/2023/12/mqtt-auto-discovery.html
    Removal of discovered units

    A nice feature is that discovered entities can be easily removed from Home Assistant at any time. This can be done by simply publishing the original discovery topic, but using an empty payload. You can see this in the else branch in the example above:

    client.publish(<original discovery topic>, "");

    This will immediately delete all entities created by the original (or last) discovery message. Note that it only deletes entities, so if they have been used in automations, scripts, dashboards, etc. in Home Assistant, they should be fixed for the currently missing entities.

    With the addition of a user-accessible toggle to enable/disable discovery, users can add or remove MQTT entities from their device in Home Assistant at any time simply by changing the state of this variable.
ADVERTISEMENT