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
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.
- 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
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.
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
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.













