Actions7
Overview
This node enables interaction with Home Assistant via its WebSocket API. Specifically, the "Device" resource with the "List" operation allows users to retrieve a list of devices registered in their Home Assistant instance. This is useful for scenarios where you want to dynamically fetch device information for automation workflows, monitoring, or integration purposes.
For example, you might use this node to:
- Get all devices in a specific area (like "Living Room") to trigger automations based on device states.
- Retrieve device lists to display or process in subsequent workflow steps.
- Filter devices by area to manage or monitor subsets of your smart home setup.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | Optional fields to refine the device listing. Currently supports filtering by: |
| - Area Name or ID | Filter devices by a specific Area, selectable either from a searchable list or by name. |
The "Area Name or ID" field lets you specify an area to limit the devices returned to those located within that area.
Output
The node outputs an array of JSON objects representing devices. Each object contains details about a device as retrieved from Home Assistant, such as its identifiers, name, area association, and other metadata.
No binary data output is produced by this operation.
Dependencies
- Requires a valid connection to a Home Assistant instance via its WebSocket API.
- An API key credential (or equivalent authentication token) must be configured in n8n to authenticate with Home Assistant.
- The node depends on internal helper modules for device operations and option loading.
Troubleshooting
- Connection errors: Ensure the Home Assistant host URL and API key are correctly configured and that the WebSocket API is enabled on the Home Assistant server.
- Empty results: If filtering by area returns no devices, verify that the specified area exists and contains devices.
- Authentication failures: Check that the API key has sufficient permissions to access device information.
- Search issues: When using the "From List" mode for area selection, if no areas appear, confirm that the node can successfully load area options from Home Assistant.