Skip to content

Releases: P1pp89/ha-ai-automation-builder

Fixed Warning "Detected blocking call to open inside the event loop and added Czech traslation

Choose a tag to compare

@P1pp89 P1pp89 released this 07 Feb 09:31
89756e0

Changelog

[2.0.2] - 2026-02-07

Translations

  • Added Czech translation (cs)

Bug Fixes

Fixed: Warning "Detected blocking call to open inside the event loop"

  • Fixed all blocking I/O calls in async_setup_entry()
  • Reading manifest.json is now performed via hass.async_add_executor_job()
  • Frontend file read/write operations moved to the executor thread
  • Frontend directory creation is now non-blocking

Impact:

  • Eliminated repeated warnings when starting Home Assistant
  • Faster and smoother bootstrap
  • No negative impact on other integrations (Alexa, Frigate, etc.)
  • Improved compatibility with Home Assistant 2026.1.x and Python 3.13

Modified files:

  • custom_components/ai_automation-builder/__init__.py

[2.0.1] - Previous

Previous version with full functionality but with synchronous I/O in the asynchronous loop.


How to Update

Via HACS (recommended)

  1. Open HACS in Home Assistant
  2. Go to Integrations
  3. Search for "AI Automation Builder"
  4. Click "Update"
  5. Restart Home Assistant

Manually

  1. Download version 2.0.2 from GitHub
  2. Replace the custom_components/ai_automation-builder/ folder
  3. Restart Home Assistant

Verification

After restarting, check the Home Assistant logs:

  • Warnings about "blocking call to open" should no longer appear
  • You should see: Component version: 2.0.2

Version Display in the "Connected" Badge and Advanced Cache Busting System

Choose a tag to compare

@P1pp89 P1pp89 released this 17 Jan 14:17
221220c

New Features Implemented

1. Version Display in the "Connected" Badge

What has been implemented:

  • The "Connected" badge now also displays the component version (e.g., "✓ Connected v2.0.0")
  • The version is dynamically loaded from the backend via WebSocket
  • ​​Multilingual support for the version badge

Files modified:

  • frontend/panel.js: Added version display in the badge
  • frontend/frontend.js: Added version display in the badge
  • websocket_api.py: New ai_automation_builder/get_version endpoint
  • const.py: Added WS_TYPE_GET_VERSION constant

How it works:

  1. When the frontend component starts, the /get_version endpoint is automatically called
  2. The backend reads the version from manifest.json
  3. The version is displayed next to the "Connected" badge
  4. If loading fails, a fallback version is used

2. Advanced Cache Busting System

Issue fixed:

Users had to manually clear their browser cache with each component update.

Implemented Solution:

  • Automatic Cache Busting: All frontend files include version parameters in the URL
  • Content-Based Hash: In addition to the version, an MD5 hash is generated for more effective cache busting
  • Dynamic Update: The version is read from manifest.json on each restart
  • Automatic Replacement: JS files are automatically updated with the current version

Files Modified:

  • __init__.py: Full cache busting and intelligent file copy system
  • websocket_api.py: Endpoint for dynamically getting the version
  • frontend/panel.js: Dynamic version loading
  • frontend/frontend.js: Dynamic version loading

How it works:

  1. When Home Assistant restarts:
  • The component reads the version from manifest.json
  • Generates an MD5 hash based on the version
  • Copies the frontend files to www/community/ai_automation_builder/
  • Replaces hardcoded versions in JS files
  • Adds cache-busting parameters to CSS/JS imports
  1. Panel Registration:
  • The module URL includes the version and hash: panel.js?v=2.0.0&h=a1b2c3d4
  • This forces the browser to download the new version
  1. In the Frontend:
  • Components load the version dynamically via WebSocket
  • ​​The UI automatically updates with the correct version

Advantages:

  • No manual cache cleaning: The browser automatically downloads new files
  • Intelligent cache busting: Only when the version actually changes
  • Compatibility: Works with all browsers and companion apps
  • Performance: Files are cached correctly between versions
  • Debugging: Easy to identify Which version is in use?

Example generated URL:

Before: /local/community/ai_automation_builder/panel.js
After: /local/community/ai_automation_builder/panel.js?v=2.0.0&h=a1b2c3d4

3. WebSocket Endpoint for Version

New endpoint:

  • Command: ai_automation_builder/get_version
  • Parameters: None
  • Response:
{
"version": "2.0.0",
"component_name": "AI Automation Builder",
"timestamp": 1642678800
}

Usage:

const result = await this.callWebSocket('ai_automation_builder/get_version', {});
console.log('Component version:', result.version);

User Instructions

To test the new features:

  1. Update the component to the new version
  2. Restart Home Assistant completely
  3. Open the AI ​​Automation Builder panel
  4. Verify that the badge shows "✓ Connected v2.0.0" (or current version)
  5. It is no longer necessary to clear your browser cache

If you encounter problems:

  1. Check the Home Assistant logs for errors
  2. Verify that the files have been copied to config/www/community/ai_automation_builder/
  3. Verify that the panel URL includes the version parameters
  4. If necessary, restart Home Assistant a second time

Notes for developers:

  • The version is automatically read from manifest.json
  • To change the version, only edit manifest.json
  • The cache-busting system is activated automatically
  • The logs show the file copying and updating process

Complete Translation Supporto and Test Preview Mode

Choose a tag to compare

@P1pp89 P1pp89 released this 16 Jan 16:15
7bacd05

This release brings complete translation support across all features, making AI Automation Builder truly international!


What's New

Complete UI Translation

  • All interface labels now translate based on your Home Assistant language
  • Preview, Test, and Dry Run sections fully localized
  • No more mixed language interfaces!

AI-Generated Content in Your Language

  • YAML alias and description now generated in your interface language
  • AI prompts optimized for each of the 7 supported languages
  • Natural language output that matches your input

Improved YAML Generation

  • Fixed duplicate actions: issue - AI now generates clean, valid YAML
  • Enhanced prompts with explicit examples of correct/incorrect formats
  • Always includes mode: single at the end
  • Better structured output for complex automations

Supported Languages

All features fully translated in:

  • 🇮🇹 Italian (Italiano)
  • 🇬🇧 English
  • 🇪🇸 Spanish (Español)
  • 🇫🇷 French (Français)
  • 🇩🇪 German (Deutsch)
  • 🇵🇹 Portuguese (Português)
  • 🇳🇱 Dutch (Nederlands)

Bug Fixes

Fixed

  • UI labels stuck in Italian regardless of language setting
  • Preview/Test/Dry Run messages not translating
  • AI generating duplicate actions: sections in YAML
  • Missing mode: single in some generated automations
  • Inconsistent language between UI and generated content

Technical Details

Frontend Changes

  • Added 18+ new translation keys for all UI labels
  • Updated rendering to use dynamic translations (this.t.labelName)
  • Language detection now passed to all backend functions
  • Improved consistency across all interface sections

Backend Changes

  • Complete translation dictionary for 7 languages (150+ strings)
  • AI prompts customized per language with explicit formatting rules
  • Enhanced prompt engineering with correct/incorrect examples
  • All analysis functions now language-aware

Translation Coverage

Interface Labels (Warnings, Triggers, Actions, etc.)
Preview Mode Messages
Test Execution Results
Dry Run Simulation Output
Error Messages
Entity Suggestions
YAML Generation (alias, description)

Upgrade Instructions

Via HACS (Recommended)

  1. Open HACS → Integrations
  2. Find "AI Automation Builder"
  3. Click "Update"
  4. Restart Home Assistant

Manual Update

  1. Download the latest release
  2. Replace files in custom_components/ai_automation_builder/
  3. Restart Home Assistant

No configuration changes required! Your existing setup will work immediately with the new translations.


Usage Examples

Before v2.0.0

UI Language: English
Generated YAML:
  alias: "Accendi luci alle 20:00"  - Mixed language
Preview: "Avvisi", "Trigger", "Azioni"  - Always Italian

After v2.0.0

UI Language: English
Generated YAML:
  alias: "Turn on lights at 8:00 PM"  - Consistent
Preview: "Warnings", "Triggers", "Actions"  - Translated

What This Means for You

If you use Italian 🇮🇹

Everything works perfectly as before, but now with cleaner YAML generation!

If you use English 🇬🇧

Finally! Complete English interface with English-generated automations!

If you use other languages

Your language is now fully supported across all features!


Statistics

  • 18 new translation keys added
  • 150+ translated strings across 7 languages
  • 100% feature coverage for all supported languages
  • 0 breaking changes - fully backward compatible

Thank You

Special thanks to the community for reporting the translation issues and helping test the fixes!


What's Next

  • Visual automation builder (drag & drop)
  • Automation templates library
  • More language support (Chinese, Japanese, Korean)
  • Voice input support
  • Community sharing platform

Documentation


Found a Bug?

Please report it on GitHub Issues


⭐ Support the Project

If you find this update useful, please:

v1.1.1 - Home Assistant UI Compatibility 2024+

Choose a tag to compare

@P1pp89 P1pp89 released this 14 Jan 17:29
c7a5368

Release Description (English)
Critical Fixes
This release fixes an important compatibility issue with the Home Assistant UI.

Fixed issue:
The AI was generating automations with deprecated YAML syntax (trigger:, action:, service:) that weren't compatible with Home Assistant 2024+ UI editor.

What changed:

  • Updated YAML format to modern Home Assistant syntax
  • Now uses triggers: instead of trigger: (plural)
  • Now uses actions: instead of action: (plural)
  • Now uses action: instead of service: in actions
  • Automatically adds mode: single to every automation
  • Backward-compatible YAML validation (accepts both syntaxes)

Format before (NOT working with UI):
yaml- alias: "Test"
trigger:
- platform: time
action:
- service: light.turn_on

Format now (UI 2024+ Compatible):
yaml- alias: Test
triggers:

  • trigger: time
    at: "20:00:00"
    actions:
  • action: light.turn_on
    target:
    entity_id: light.example
    mode: single

How to Update

  • Update via HACS
  • Restart Home Assistant

New generated automations will be UI-compatible

Important Notes

Existing automations will continue to work
Only NEW generated automations will use the updated format
No breaking changes for existing users

Changelog

Fixed YAML format compatibility with Home Assistant 2024+ UI editor
Updated AI prompt to generate modern YAML syntax
Fixed validation to accept both old and new formats

Changed

trigger: → triggers: (plural)
action: → actions: (plural)
service: → action: in action definitions
Added automatic mode: single to all automations

Technical

Updated websocket_api.py with new AI prompt
Enhanced YAML validation for backward compatibility
Improved examples in AI system prompt

Files Changed

custom_components/ai_automation_builder/websocket_api.py
custom_components/ai_automation_builder/manifest.json (version bump)

v1.1.0 - First stable release

Choose a tag to compare

@P1pp89 P1pp89 released this 12 Jan 21:12
680b756

Bug Fix Summary - AI Automation Builder

  1. HACS Frontend Download Fallito
    Problema: HACS scaricava solo custom_components/ ma ignorava style.css, panel.js, frontend.js, index.html
    Fix:
  • Riorganizzata struttura: custom_components/ai_automation_builder/frontend/
  • manifest.json con "frontend_panels": ["ai-automation-builder"]
  1. Validazione YAML Troppo Rigorosa
    Problema: Richiedeva obbligatoriamente alias, triggers, actions causando falsi negativi
    Fix (websocket_api.py):

  2. OpenAI Error 429 - Quota Exceeded
    Problema: Crediti gratuiti OpenAI esauriti
    Fix:

  • Messaggio chiaro: "Controlla crediti su platform.openai.com"
  • Raccomandazione Groq (gratuito + veloce)
  • Gestione specifica if resp.status == 429
  1. ModuleNotFoundError "automation platfor
    Problema: async_forward_entry_setups(entry, ["automation"]) cercava file inesistente
    Fix:
  • (init.py):
  1. Blocking Call File I/O
    Problema: shutil.copy2() bloccava event loop durante boot
    Detected blocking call to open with args inside the event loop
    Fix:
  • (init_FIXED_v3.py)

1.0.0 - First Release AI Automation Builder

Choose a tag to compare

@P1pp89 P1pp89 released this 11 Jan 15:38
453df58
Update README.md with new content and formatting