# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.intecular.com/invisoutlet-pro/device-management/invisoutlet/home-assistant-discovery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
