The AI Task in Home Assistant is new and powerful feature. Imagine walking into your home after a long day, and your smart home greets you with a personalized welcome message, complete with the latest soccer scores. Or picture getting a notification about how many people are detected in a camera snapshot, keeping your home secure with AI-powered insights.
These are just a glimpse of what the AI Task in Home Assistant can do to elevate your smart home experience. With the latest Home Assistant update, the AI Task feature lets you harness the power of artificial intelligence, like Google Gemini AI, to create automations that are not only practical but also engaging and fun.
In this post, we’ll explore three incredible automations using AI Task in Home Assistant that you’re probably not using—but absolutely should. Ready to make your home smarter? Let’s dive in!
Table of Contents
Why AI Task in Home Assistant is a must?
The AI Task feature in Home Assistant allows you to integrate AI models, such as Google Gemini, to generate dynamic content, analyze data, and control your smart home devices in ways that were previously unimaginable. Whether it’s crafting personalized messages, analyzing weather data, or counting people in a camera snapshot, AI Task in Home Assistant brings a new level of intelligence to your automations. These automations are easy to set up, highly customizable, and can make your smart home feel more intuitive and responsive. Plus, with Google Gemini’s free tier and support for structured output, it’s an accessible way to supercharge your Home Assistant setup.
Setting Up AI Task in Home Assistant: Key Steps
To make these automations work, you’ll need to set up Google Gemini AI or other AI like ChatGPT, Claude or even local LLM. The weather forecast integration like the one from Met.no is optional in Home Assistant. Here’s a quick overview of what you need to do:
Adding Google Gemini AI
- Get an API key from Google AI Studio.
- Add the Google Generative AI integration in Settings > Devices & Services > Add Integration > Google.
- Set it as the default AI Task entity in Settings > System > General to streamline your automations.
Adding met.no Integration
- Go to Settings > Devices & Services > Add Integration, and search for and add the Met.no integration, then enter your home’s coordinates.
- Verify the
weather.forecast_home
entity is available for weather-based automations.
These steps ensure AI Task in Home Assistant can communicate with Google Gemini and access weather data for dynamic automations.
Are you a visual person?
But before we get to the automations, are you tired of reading long tutorials? If you prefer a visual guide, check out my detailed video tutorial that walks you through setting up these automations step-by-step.
Watch the Video Tutorial Now: Click here to watch on YouTube
Automation 1: Welcome Home with a Personalized Message
Let’s start with something simple yet delightful. The first automation uses AI Task in Home Assistant to create a warm welcome message when you arrive home. Imagine your smart home saying, “Welcome back, John! Here’s the latest soccer score: Manchester United won 2-1 last night!” This automation triggers when your person entity (like person.john
) switches to “home” and uses AI to generate a friendly message with a short summary of recent international soccer results. The message appears as a persistent notification in Home Assistant and can even be spoken through a media player using a Text-to-Speech (TTS) service.
How It Works
- Trigger: The automation activates when your person entity changes to “home.”
- AI Task: The AI Task feature sends a prompt to Google Gemini, asking for a short, friendly message and a soccer results summary.
- Output: The generated text is displayed as a notification, and optionally, your smart speaker reads it aloud.

Why You’ll Love It
This automation is perfect for adding a personal touch to your smart home. It’s easy to set up, requires minimal configuration, and showcases how AI Task in Home Assistant can create engaging, dynamic content. To make it work for you, replace the person entity with your own (e.g., person.your_name
) and ensure your TTS service is configured.
Get the Full Setup Guide: Want the complete YAML code and step-by-step instructions? Download my free PDF guide! To get it, just type your name and email. You will receive an email from me where you can confirm that you are not a robot. And the PDF will be yours to have. Inside the PDF, you will find step-by-step instructions on how to enable Google AI in your Home Assistant, all automations’ YAML code from this video, plus a few extra not shown here, and very detailed explanations.
You will also be subscribed to my newsletter where I share news and updates. It’s a free service, and if you don’t like it, you can unsubscribe at any time with just one click. Download the PDF now.
Automation 2: Count Persons from an Image
Want to know how many people are in a room or outside your home? This automation uses AI Task in Home Assistant to analyze a camera snapshot or uploaded image and count the number of people in it. For example, you might get a notification saying, “I counted 3 people in the yard that is unusual!” This automation updates a number helper with the count and sends a notification, making it perfect for security or monitoring purposes.
How It Works
- Trigger: The demo automation runs every 5 minutes (or every 10 seconds for testing).
- AI Task: The AI analyzes an image (e.g., from a camera or uploaded to Home Assistant’s media) and counts the visible people.
- Output: The count is stored in an
input_number.person_count
helper, and a notification displays the result.

Why You’ll Love It
This automation showcases the advanced image analysis capabilities of AI Task in Home Assistant, allowing you to monitor your home without additional hardware. To set it up, create an input_number.person_count
helper, upload an image to Home Assistant’s media, or use a camera snapshot, and ensure Google Gemini is configured for image analysis.
Unlock the Full Code: Curious about the exact YAML configuration? My PDF guide includes this automation, and detailed setup instructions. Grab your free PDF here and start automating like a pro!
Automation 3: Weather-Based Clothing Suggestions
This automation takes things up a notch by integrating weather data with AI Task in Home Assistant to suggest what to wear based on the current forecast. For instance, if it’s chilly and rainy, you might get a notification like, “Brr, 10°C and drizzle—grab a jacket and your trusty umbrella! ☔” This automation uses the met.no weather integration to fetch hourly forecasts and lets the AI craft a short, funny clothing suggestion.
How It Works
- Trigger: You can trigger this manually via an input button or set it to run periodically (e.g. every work day at 08:00am).
- Weather Data: The automation pulls the hourly forecast from the
weather.forecast_home
entity. - AI Task: The AI analyzes the weather data and generates a concise, humorous clothing suggestion under 20 words.

Why You’ll Love It
This automation is practical and relatable, helping you dress appropriately for the weather while showcasing the power of AI Task in Home Assistant to process external data. To get started, ensure the met.no integration is set up and replace the trigger with your preferred method (e.g., a time-based schedule).
Watch the Video: If you want to see this automation in action, check out my video tutorial for a hands-on demonstration. Watch now on YouTube.
Get the code: It is all in my PDF that I prepared. It is yours to have and inside you will find 6 more examples. Here is a download link:
https://automatelike.pro/aitask
Why These Automations Matter
These three automations demonstrate the versatility of AI Task in Home Assistant. From personalized greetings to AI-powered image analysis and weather-based suggestions, they show how AI can make your smart home more intuitive, engaging, and practical. Whether you’re a beginner or an advanced user, these automations are easy to adapt to your setup. Plus, they’re just the start—my PDF guide includes additional automations, like controlling lighting with AI, for even more advanced use cases.
Get All the Details: Don’t miss out on the full YAML code, extra automations, and detailed setup instructions. Download my free PDF guide now! And again, this automation YAML code can be found in my PDF as well as the alternatives that I mentioned.
To get it, just type your name and email. You will receive an email from me where you can confirm that you are not a robot. And the PDF will be yours to have. Inside the PDF, you will find step-by-step instructions on how to enable Google AI in your Home Assistant, all automations’ YAML code from this video, plus a few extra not shown here, and very detailed explanations. You will also be subscribed to my newsletter where I share news and updates. It’s a free service, and if you don’t like it, you can unsubscribe at any time with just one click. Download the PDF now.
Conclusion: Supercharge Your Smart Home Today
The AI Task in Home Assistant feature opens up a world of possibilities for creating smarter, more personalized automations. With these three automations, you can add a touch of personality to your home, enhance security with image analysis, and make daily decisions easier. Whether you’re welcoming yourself home, monitoring your space, or dressing for the weather, AI Task in Home Assistant makes it all possible. Ready to get started? Watch the video tutorial, grab the PDF guide, and transform your smart home today!
Watch the Video Tutorial: Click here to see these automations in action.
Download the Free PDF Guide: Get all the YAML code, extra automations, and detailed setup instructions. Click here to download.
More AI and Home Assistant article can be found here: AI in HA Link