> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmcontrols.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Home Assistant

## **Home Assistant Control**

This component controls Home Assistant devices. It provides actions like turn\_on, turn\_off, and toggle for any entity. The domain is automatically extracted from the entity ID.

### **Prerequisites**

* A Home Assistant Long-Lived Access Token
* A Home Assistant server URL

<Accordion title="Parameters">
  **Inputs**

  | Name                | Display Name                 | Info                                                              |
  | :------------------ | :--------------------------- | :---------------------------------------------------------------- |
  | ha\_token           | Home Assistant Token         | Home Assistant Long-Lived Access Token.                           |
  | base\_url           | Home Assistant URL           | e.g., [<u>http://192.168.0.10:8123</u>](http://192.168.0.10:8123) |
  | default\_action     | Default Action (Optional)    | One of turn\_on, turn\_off, toggle.                               |
  | default\_entity\_id | Default Entity ID (Optional) | Default entity ID to control (e.g., switch.unknown\_switch\_3).   |

  Outputs

  | Name             | Display Name | Info                                                          |
  | :--------------- | :----------- | :------------------------------------------------------------ |
  | api\_run\_model  | Data         | The Home Assistant API response as a Data object.             |
  | api\_build\_tool | Tool         | A tool for use by an agent to control Home Assistant devices. |
</Accordion>

## **List HomeAssistant States**

This component retrieves device states from Home Assistant. It can return all states or filter by domain (e.g., light, switch, sensor).

### **Prerequisites**

* A Home Assistant Long-Lived Access Token
* A Home Assistant server URL

<Accordion title="Parameters">
  **Inputs**

  | Name           | Display Name                     | Info                                                              |
  | :------------- | :------------------------------- | :---------------------------------------------------------------- |
  | ha\_token      | Home Assistant Token             | Home Assistant Long-Lived Access Token.                           |
  | base\_url      | Home Assistant URL               | e.g., [<u>http://192.168.0.10:8123</u>](http://192.168.0.10:8123) |
  | filter\_domain | Default Filter Domain (Optional) | light, switch, sensor, etc. (Leave empty to fetch all)            |

  Outputs

  | Name             | Display Name | Info                                                      |
  | :--------------- | :----------- | :-------------------------------------------------------- |
  | api\_run\_model  | Data         | The device states as a Data object.                       |
  | api\_build\_tool | Tool         | A tool for use by an agent to list Home Assistant states. |
</Accordion>
