See llms.txt for all machine-readable content.

Home Assistant and OpenAI integration

Save yourself the work of writing custom integrations for Home Assistant and OpenAI and use n8n instead. Build adaptable and scalable Miscellaneous, workflows that work with your technology stack. All within a building experience you will love.

How to connect Home Assistant and OpenAI

Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Home Assistant and OpenAI integration: Create a new workflow and add the first step

AI-generated weather analysis with NWS alerts, radar imagery, and Home Assistant

Overview This n8n template demonstrates how you can generate an AI-produced weather analysis of your local radar loop and home assistant precipitation sensor(s) to keep your family informed of National Weather Service Alerts. With as crazy as things have been lately in the open world, how will you and your family know when a severe or extreme alert impacts your area? How it Works This workflow is triggered by a webhook which takes a latitude and longitude json payload to identify the area for monitoring. Then, it fetches the National Weather Service Alerts and filters them down to alerts which are currently active and their severity. Next, it fetches the local precipitation value from your Home Assistant instance (a value like "Light Rain" or "No Rain", etc) coupled with your respective weather.gov radar loop image. It then submits this data to OpenAI and produces an output regarding the image analysis. Finally, it takes this analysis and uses OpenAI to again generate a short summary. How to Use Import the workflow into your n8n instance Update the credentials in the problematic nodes Make sure you adjust the radar loop image that is being used Requirements A Home Assistant Instance (you could remove this data if you wanted) An OpenAI account for LLM and image analysis

Popular ways to use the Home Assistant and OpenAI integration

Build your own Home Assistant and OpenAI integration

Create custom Home Assistant and OpenAI workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Home Assistant supported actions

OpenAI supported actions

Home Assistant and OpenAI integration details

Home Assistant

Home Assistant

Home Assistant is an open-source home automation service that provides local control and privacy. It is powered by a global community of DIY enthusiasts and tinkerers. Perfect for use on a local server or a Raspberry Pi.

OpenAI

OpenAI

OpenAI, the creator of ChatGPT, offers a range of powerful models including GPT-3, DALL·E, and Whisper. Leverage these models to build AI-powered workflows.

FAQ about Home Assistant integrations

Need help setting up your Home Assistant and OpenAI integration?

Discover our latest community's recommendations and join the discussions about Home Assistant and OpenAI integration.

  • Artem

    How to define AI-powered Extra Workflow Inputs in AI tools?

    Artem

    Describe the question I need to pass to the tool some data from the AI Agent. Like, “task name” and “task tags” to create a task via Custom Workflow Tool. So I don’t know what to refer to in the Extra Inputs. Because th…

    Open topic
  • sérgio eduardo floresta filho

    The prompt is not being executed

    sérgio eduardo floresta filho

    Hello! My goal is to use Google Forms to collect information from my clients and then use n8n to automate the processing of this information. My workflow involves: Collecting data through Google Forms. Using n8n to re…

    Open topic
  • Heisenbug

    How to handle multi-message prompts in OpenAI Chat node?

    Heisenbug

    Describe the problem/error/question I want to send multiple messages to the OpenAI Chat node (LangChain → LLM Prompt Template) in a single execution, simulating a conversation. The first message is fixed, and the followi…

    Open topic
  • Julien

    OpenAI node - How to use the new Endpoint?

    Julien

    Is it possible to choose the Responses API or OpenAI ? It has been updated a few months ago by OpenAI, but the node still seems to be using the old Completions API. [https://platform.openai.com/docs/guides/migrate-to-re…

    Open topic
  • Andrew adawdad

    OpenAI not receicving JSON data from previous node

    Andrew adawdad

    Describe the problem/error/question Im currently using the openAI node to send a text message to the system. I am sending the previous nodes JSON data, but the openai response says that im only sending {{ $json }} instea…

    Open topic

Looking to integrate Slack and VirusTotal in your company?

Trusted by teams building smarter workflows.

Why

Why use n8n to integrate Home Assistant with OpenAI

Handle branching, merging and iteration easily. Pause your workflow to wait for external events.

Re-run single steps to test changes in no time. And pin your data to avoid generating trigger events every time you execute.

Your data is displayed alongside your settings, making edge cases easy to track down.

Use 1000+ workflow templates available from our core team and our community.

Copy and paste, easily import and export workflows.

Simple enough to 
understand + sophisticated 
enough to ship