Home Assistant’s hidden AI image generator is way more useful than it sounds


Home Assistant includes a built-in tool for generating images using AI. AI Task has been around since 2025, with image generation added in Home Assistant 2025.10, but you may still be completely unaware of it. Once you know how to use it, it can be very useful.

AI Task is a building block integration

You need other integrations to use it

Information about building block integrations in Home Assistant.

The reason that you may not have stumbled across the image generation in Home Assistant is that it’s part of a building block integration. The AI Task integration can’t be directly added to your Home Assistant instance like standard integrations; it’s a tool made available for other integrations to use.

There are two main actions for the AI Task integration. The ai_task.generate_data action can use a connected LLM to generate data based on a prompt. The ai_task.generate_image action generates an image using AI based on the included prompt.

To take advantage of these actions, you need to use an integration that supports them. For example, the OpenAI integration can use these actions to generate data or images, using OpenAI’s models to return text or images based on your instructions.

Home Assistant Green

Dimensions (exterior)

4.41″L x 4.41″W x 1.26″H

Weight

12 Ounces

Home Assistant Green is a pre-built hub directly from the Home Assistant team. It’s a plug-and-play solution that comes with everything you need to set up Home Assistant in your home without needing to install the software yourself. 


Connecting an AI provider

The main options incur API costs

A robot coming out of the ChatGPT logo, heading towards the Claude AI logo. Credit: Lucas Gouveia / How-To Geek

To use image generation in Home Assistant, the simplest options are to use one of the supported AI integrations. There are several integrations that you can use. The OpenAI integration allows you to use some of the same models as ChatGPT uses, although for image generation, you can’t currently use the flagship GPT Image 2 model.

The other main option is the Google Gemini integration. You can use this to generate images using Google’s AI models. It uses the gemini-2.5-flash-preview-image model, which is Nano Banana, rather than Nano Banana 2 or Nano Banana Pro.

Using either of these integrations will incur API costs, even if you have a subscription to Gemini or ChatGPT. The costs are generally low for occasional use, although the exact price depends on the provider and model that you’re using.

There are ways to use local image generation; a HACS integration allows you to generate images locally using ComfyUI, but this requires hardware that is powerful enough to handle the image generation locally. The upside is that local image generation is not only more private, but also free.

Once you have an integration set up, you can use the ai_task.generate_image action in your automations to generate images. You need to include the prompt as the instructions attribute and select the appropriate LLM task as the entity_id, such as ai_task.google_ai_task.


Raspberry Pi computer on a wooden surface with cables connected.


These Are the 7 Best Ways to Run Home Assistant

Find the best hardware for your smart home hub.

What you can do with image generation in Home Assistant

It can actually be useful

Generating images using AI doesn’t seem like something that would necessarily be useful in your smart home. However, there are plenty of ways that it can be useful.

One of my favorite things I’ve set up on my iPhone is a widget that displays an image of the current local weather conditions generated by ChatGPT. The entire thing runs from an iOS shortcut, and it’s a great way to see what the weather is like at a glance. The best part is that when I travel, the image is of the current location rather than my home.

I used the image generation in Home Assistant to set up a similar thing in Home Assistant. Every two hours during the day, an automation checks the current weather, and uses Gemini to create an image depicting the current weather conditions. If the conditions haven’t changed, no new image is generated, to save on API costs.

You can also use AI-generated images to create visual feedback about the state of your smart home, or to create custom images for Home Assistnt notifications. If you have a wall-mounted dashboard, you can have it display AI-generated images when you’re not using it, or to add graphics and images to your calendar that are specific to your upcoming events.

Since AI models can generate almost anything you want, the real limits are your imagination. An image can often impart information in a much more digestible way than a long notification.

Displaying generated images on your dashboards

Writing the output to a Picture Card

A Home Assistant dashboard Picture card showing an AI-generated cloudy countryside landscape with a Current Weather Cloudy label.

Generating images is great, but by default these just end up in the Media tab of Home Assistant. One of the best ways to display them is using a dashboard.

This turns out to be slightly problematic. The images are saved permanently so you can always find them in the Media browser. You can’t use the media_source_id to display the images in a dashboard, however. The link that Home Assistant generates comes with a one-hour security token, which expires.

The dashboard doesn’t use that URL directly; it uses Home Assistant’s own image proxy instead, so the image will continue to display after the security token has expired. The only issue comes when you restart Home Assistant; the template entity loses track of which image it was displaying, so the dashboard will go blank until the next image is generated.


AI-generated images can become part of your smart home

Generating custom images for your smart home can be very useful. The images are kept by default, so you may need to do some spring cleaning if your Home Assistant backups start to get huge. While you do have to pay to use cloud-based models, the costs are fairly low as long as you’re not creating hundreds of images a day.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


macOS has a built-in screenshot tool that gets the basics right. You can take a screenshot, record your screen, and even annotate your captures. But the moment you want something more, like scrolling capture, advanced annotation tools, or a quick way to share your screenshots via a link, it starts to fall apart.

That’s where CleanShot X comes in. It’s a powerful screenshot and screen recording app for Mac that replaces the built-in screenshot tool. It feels as if the developers looked at the screenshot features in macOS and added everything that was missing.

Over the past few years, the app has added several new features I didn’t know I needed until it offered them. It has become one of my favorite Mac utilities, and in this article, I will show you its features that will convince you to buy the app instantly. 

Scrolling capture saves you from stitching screenshots together

One of the most frustrating limitations of macOS’s screenshot tool is that it can only capture what’s visible on your screen. If I need to capture a long webpage or a full chat history, I am stuck taking multiple screenshots and stitching them together. That wastes an unbelievable amount of time. 

CleanShot X solves this with its scrolling capture feature. I can trigger the scrolling capture, and CleanShot X automatically scrolls through the content and delivers a single image. I don’t even have to manually scroll the page if I don’t want to.

This feature alone saves me hours of time every month. If you have to deal with long screenshots, you should definitely try it out. 

Time delay capture lets you screenshot the impossible

Some screenshots are tricky to take because they require you to trigger something before capturing. For example, sometimes the on-screen feature you want to capture disappears as soon as you use a keyboard shortcut or click anywhere with your mouse. 

Sometimes, the on-screen elements appear for a short time, and by the time you hit the screenshot shortcut, they disappear. CleanShot X’s time delay capture gives me a few seconds to set things up before the screenshot is taken. I trigger the capture, put everything in place, and CleanShot X does the rest. 

It’s a small feature that solves a genuinely annoying problem.

Capture text from images with OCR

I love that CleanShot X has a built-in OCR function. It lets me capture text directly from any image or video on my screen. Although it happens rarely, I have come across websites that don’t let me copy content. With CleanShot X’s OCR function, that’s not an issue. 

I use this constantly when reviewing PDF documents with restricted permissions or watching a video on YouTube. It is far faster than typing things out manually, and it works surprisingly well. There are many apps that let you capture text with OCR, but since CleanShot X has this feature built in, I don’t need to install an extra app. 

Add beautiful backgrounds to your screenshots

If you share screenshots for work, tutorials, or social media, you know how plain a raw screenshot looks. CleanShot X lets me add beautiful backgrounds to my screenshots, turning a flat capture into something that looks polished and share-ready.

For backgrounds, I can choose from solid colors, gradients, or even my current desktop wallpaper. I can also adjust the padding and shadow, align the screenshot to the edges, and adjust the corner radius. It takes a few seconds and makes a huge difference in how professional your screenshots look.

Annotation tools that get the job done

While macOS’s screenshot tool lets you annotate your screenshots, the annotation tools inside CleanShot X are, in my opinion, the best available on the Mac. 

I can add arrows, text labels, shapes, highlights, and more. I can also change the weight and color of annotations. There are also multiple arrow styles I can choose from. I especially like the curved arrow style that lets me curve the arrows and make them pop. 

One of my favorite new additions is the “Highlighter” tool. It snaps to the text in a screenshot, which makes it really easy to highlight it before sharing. 

Then there’s the “Spotlight” tool that highlights your selection by darkening the rest of the screenshot. It’s perfect for drawing someone’s attention to a specific part of a screenshot. 

No matter what annotation tools you need, you can find them and more in CleanShot X. 

Hide sensitive information before you share

You can find hundreds of instances in the news where a prominent figure shared a screenshot and inadvertently revealed private information. Thankfully, CleanShot X has a dedicated tool to blur or black out sensitive information, so such accidents never happen.

I can choose to pixelate, blur, or completely black out the information. The best part is that I can also adjust the strength of these effects. It lets me blend in the hidden information so the blur doesn’t stand out from the rest of the screenshot. 

Video and GIF recording built right in

CleanShot X also lets you record your screen as a video or export directly as an optimized GIF. The GIF export is particularly useful for sharing quick demos or showing someone how to do something without creating a large video file. 

It can record the entire screen, a specific window, or a custom region. It can also show my mouse clicks and keyboard shortcuts. I can record my computer audio, my microphone, and webcam video. 

I love that it automatically adds the webcam video in the corner, so it doesn’t interfere with the rest of the recording. I can also change the video size and shape. All these features make it really easy to create video tutorials. 

Quick share with cloud links

Once you take a screenshot or finish a recording, you need to share it. Of course, you can easily share screenshots via messages or emails. But CleanShot X gives me a better way. 

Whenever I capture something, it opens a quick share overlay. I can use it to instantly upload my screenshots to CleanShot Cloud and grab a shareable link with a single click.

I no longer have to drag files into cloud storage, attach images to emails, or upload to third-party services. I capture it, click share, and paste the link. It is one of those workflow improvements that sounds minor until you use it every single day.

Capture beautiful screenshots with CleanShot X

CleanShot X has become one of my most dependable apps on Mac. In fact, all the screenshots you see in this article or any of my articles have been captured using CleanShot X. Yes, it’s a paid app, but it has paid its cost multiple times over with the time it has saved me. 

CleanShot X is available as a one-time purchase or through a SetApp subscription. If you want unlimited cloud storage, you have to pay for a monthly subscription. That will also get you advanced features like a custom domain and branding, password-protected link sharing, and more. 

For most users, the one-time purchase is more than enough, and it’s what I use. If you spend any time taking screenshots or recording your screen on a Mac, it is absolutely worth every penny.



Source link