@ginden/ha-mqtt-discoverable
    Preparing search index...

    Class HaDiscoverableManager

    This class manages everything related to the discoverable entities.

    Index

    Constructors

    Properties

    client: MqttClient
    manualAvailability: boolean
    messageCallback: OnMessageCallback = ...

    Methods

    • This method adds a connect callback to the manager It will be called when the client connects to the broker. If the client is already connected, it will be called immediately, and a potential error will be emitted as error event on the client. This is not an elegant solution, but async constructors don't exist in JS.

      Parameters

      • callback: (client: MqttClient) => unknown

      Returns void

    • Delete all discoverable from Home Assistant You need to call this method before disconnecting from the broker. AggregateError will be thrown if any of the unregistering fails.

      Returns Promise<void>