Generate images from text with this Home Assistant Add-on

Placeholder Service

I’m excited to share a Home Assistant add-on I developed that allows you to locally generate images from text input using HTTP requests. This can be a great way to create custom elements for your dashboards, notification cards, or any other visual aspect you can imagine in Home Assistant.

Features:

  • Home Assistant Integration: Seamlessly integrate the image generation functionality into your Home Assistant environment.
  • Text to Image Conversion: Convert text to image with various customization options.
  • Customization Options: Choose from different image formats (PNG by default), modify font, text color, background color, font size, and alignment.
  • Font Selection: Leverage Google Fonts for a wide variety of fonts (requires internet connection).

Installation:

This add-on can be easily installed through the Home Assistant Add-on Store or manually to any other platform using docker.

Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.

Usage:

After configuring and starting the add-on, you can integrate it into your Home Assistant automations or lovelace dashboards using the add-on’s URL. Here’s an example of how to use curl to generate an image:

curl "http://<YOUR_HASS_URL>:9845/?text=Hello\nWorld!&color_text=00FF00&color_bg=0F00C0"

Replace <YOUR_HASS_URL> with the URL of your Home Assistant instance.

Example Use Cases:

  • Display dynamic sensor values or weather information as an image on your dashboard.
  • Create custom notification images with personalized messages.
  • Generate welcome messages or status updates for guests.

I hope you find this add-on useful! Let me know if you have any questions or suggestions.