Home Assistant WS icon

Home Assistant WS

Node to interact with Home Assistant through the WebSocket API

Actions7

Overview

This node enables interaction with Home Assistant via its WebSocket API, specifically allowing users to perform various operations on different Home Assistant resources. For the "Service Action" resource with the "List" operation, the node retrieves a list of service actions available within a specified service domain in Home Assistant.

Common scenarios include automating smart home workflows by querying available services before triggering them or integrating Home Assistant service data into other automation platforms. For example, a user might list all service actions under a lighting domain to dynamically build UI elements or conditionally execute specific services based on availability.

Properties

Name Meaning
Service Domain ID The identifier of the service domain whose service actions you want to list. Can be selected from a searchable list of domains or entered by name manually.

Output

The node outputs an array of JSON objects representing the service actions found within the specified service domain. Each object typically contains details about a single service action, such as its name and description, enabling downstream nodes or workflows to utilize this information for further processing or decision-making.

No binary data output is involved in this operation.

Dependencies

  • Requires connection credentials to a Home Assistant instance supporting the WebSocket API.
  • Needs an API key or token for authentication to access Home Assistant's WebSocket interface.
  • The node depends on internal modules that handle communication with Home Assistant and perform the actual listing of service actions.

Troubleshooting

  • Common Issues:

    • Incorrect or missing Home Assistant credentials will prevent connection.
    • Specifying a non-existent or misspelled service domain ID may result in empty results or errors.
    • Network connectivity issues between n8n and the Home Assistant server can cause timeouts or failures.
  • Error Messages:

    • Authentication failures usually indicate invalid or expired API keys; verify and update credentials.
    • Errors related to service domain lookup suggest checking the domain ID input or ensuring the domain exists in Home Assistant.
    • Connection errors imply verifying the host address and network accessibility.

Links and References

Discussion