> For the complete documentation index, see [llms.txt](https://api.intecular.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.intecular.com/invisoutlet-pro/device-management/invisoutlet/home-assistant-discovery.md).

# Home Assistant Discovery

> Send or clear the InvisOutlet entites in Home Assistant dashboard by the Home Assistant Discovery Payload.

**Request**

* <mark style="color:red;">`packetID`</mark>: Represents the ID of the packet. This can be any six digit number, no leading zeros.
* <mark style="color:red;">`payload`</mark>:&#x20;
  * <mark style="color:red;">`callbackName`</mark>: 27
  * <mark style="color:red;">`callbackArgs`</mark>:&#x20;
    * `0`: Specifies what MQTT commands to send; 1 - Clear Home Assistant Discovery Payload, 2 - Send Home Assistant Discovery Payload.

```json
{
    "packetID": 414883,  
    "payload":
    {
        "callbackName": 27,  
        "callbackArgs": [2] 
    }
}
```

**Response**

* <mark style="color:red;">`sn`</mark>: The serial number of the InvisOutlet.
* <mark style="color:red;">`packetID`</mark>: Represents the ID of the packet based on request <mark style="color:red;">`packetID`</mark>.
* <mark style="color:red;">`PUBACK`</mark> : If the request is successfully processed; 1 - The discovery payload is sent, 0 - The discovery payload is not sent or MQTT broker isn't connected.

```json
{
    "sn": "0003C44076",
    "packetID": 414883,
    "PUBACK": 1
}
```

{% hint style="info" %}
The MQTT configuration is set via [Configure Device Configuration](/invisoutlet-pro/information-and-preferences/configure-device-configuration.md). Make sure [MQTT is connected](/invisoutlet-pro/device-management/invisoutlet/check-mqtt-status.md) to the broker before sending/clearing the Home Assistant Discovery Payload.
{% endhint %}
