Skip to content

Releases: ITSpecialist111/ai_automation_suggester

AI Automation Suggester 1.2.1

05 Jan 13:33
Compare
Choose a tag to compare

AI Automation Suggester 1.2.1

Release Date: 2025-01-05

Highlights

  • Improved Prompt Management & Token Handling

    • Added approximate token counting and truncation for both OpenAI and Google calls to avoid sending overly large prompts.
    • Ensures requests stay within each provider’s maximum token limit (e.g., 30,720 tokens for Google, 32,768 for OpenAI).
  • Model-Specific Parameter Adjustments

    • For OpenAI:
      • Standard models continue to use max_tokens.
      • New or special models (e.g., gpt-4o, o1, o1-mini, o1-preview) that require max_completion_tokens are now properly supported.
      • Prevents the “Unsupported parameter: 'max_tokens'” error on models that do not accept max_tokens.
    • For Google:
      • Simplified approach that uses maxOutputTokens only—removed checks for non-Google models (e.g., gpt-4o, o1-preview).

Detailed Changes

  1. OpenAI Fixes

    • Added logic to detect specific models needing max_completion_tokens instead of max_tokens (e.g., gpt-4o, o1, o1-mini, o1-preview).
    • When prompt size is too large, we truncate it to stay within a safe limit (default ~32K tokens).
  2. Google API Updates

    • Introduced token counting to cap request size at 30,720 tokens, addressing the INVALID_ARGUMENT errors.
    • Removed references to non-Google models in the Google request code.
  3. General Resilience

    • Safer request-building steps guard against sending huge prompts or invalid parameters.
    • Logging improvements to warn when prompts exceed size limits.

Upgrading

  • No special steps required for upgrading from 1.2.0 to 1.2.1.
  • Restart Home Assistant after updating to ensure the changes take effect.

Notes

  • If you continue to see truncation warnings, consider refining your prompts or summarizing content.
  • If you use custom models not listed here (beyond gpt-4o, o1, o1-mini, o1-preview), you can extend the logic in coordinator.py similarly to handle model-specific parameters.

Thank you for using AI Automation Suggester!

1.2.0 - AI Automation Enhancement Release - Please Read!

15 Dec 12:37
Compare
Choose a tag to compare

This integration is automatic on Restart of HASS. Other suggestions must have an automation to trigger please see automations YAML in the codebase or GitHub!

🌟 Key Features

🎲 Randomized Entity Selection

  • AI Automation Suggester now randomly samples entities
  • Provides more diverse and dynamic suggestions
  • Prevents repetitive automation patterns

🎯 Enhanced Control & Filtering

  • Domain-specific filtering (e.g., light, sensor)
  • Customizable entity limits
  • Fine-grained control over automation scope

🧠 Smarter Context Awareness

  • Integration with device and area registries
  • Location-aware suggestions
  • Device-specific automation recommendations

💡 Improvements

Prompt System Enhancements

  • Custom prompt support with clean system integration
  • Theme-based automation suggestions
    • Energy-saving focus
    • Presence-based control
    • Custom instruction support

🛠 Technical Optimizations

  • Intelligent prompt truncation
  • Token limit management
  • Improved stability for large HA installations

📚 Documentation

  • Updated README
  • Enhanced service documentation
  • New examples for:
    • Custom prompts
    • Entity filtering
    • Random selection

🔧 Installation Notes

  • Update services.yaml for new parameters
  • No const.py modifications needed
  • Check startup triggers if unexpected suggestions occur

📅 Release Date: 2024-12-15 - Graham Hosking

V1.1.4 Release

07 Dec 12:50
b23620a
Compare
Choose a tag to compare

Release Title: AI Automation Suggester v1.1.4
🚀 New Features
Added simplified Chinese (zh) translation file to enhance accessibility for Chinese-speaking users.
Added Dutch (nl) translation file to support Dutch-speaking users.
🛠 Improvements
Enhanced localization support to accommodate multiple languages.
Updated documentation to reflect the addition of new translations.
🐛 Bug Fixes
Resolved minor issues with configuration validation in the provider setup.
Improved error messages for better troubleshooting.
🌍 Localization Notes
For Chinese, the file is named zh.json following ISO language conventions.
For Dutch, the file is named nl.json.
📥 How to Upgrade
Pull the latest code from the repository.
Ensure your Home Assistant instance is updated to the latest version.
Replace existing language files with the new ones as necessary.
📣 Call for Contributions
We welcome contributions for additional translations or improvements. If you’d like to add support for another language or enhance existing features, feel free to submit a pull request!

1.1.3 Fixes

12 Nov 13:21
Compare
Choose a tag to compare

Release Notes - Version 1.1.3

🐛 Bug Fixes

  • Fixed notification error by removing incorrect await expression from persistent_notification.async_create call in coordinator.py
  • Resolved template TypeErrors in automation handling:
    • Fixed TypeError: argument of type 'NoneType' is not iterable
    • Fixed TypeError: expected string or bytes-like object, got 'datetime.timedelta'
    • Improved template variable initialization and type handling

🔄 Core Changes

  • Added configuration version migration support for smoother upgrades and downgrades
  • Improved configuration handling for better stability
  • Implemented async_migrate_entry to handle configuration version changes
  • Enhanced error handling and logging during migrations
  • Removed deprecated scheduling fields (scan_frequency and initial_lag_time) during upgrades
  • Added safety checks for configuration downgrades from future versions

🌍 Internationalization

  • Added complete Italian (it) language support including:
    • Configuration interface
    • Error messages
    • Service descriptions
    • Provider settings
  • Enhanced overall i18n capabilities

📝 Important Notes

  • Existing configurations will be automatically migrated during upgrade
  • Safe configuration handling is implemented for downgrades from future versions
  • The interface is now available in both Italian and German

👥 Contributors

Special thanks to:

🔍 Technical Details

The notification error fix resolves issues encountered when manually triggering automations, ensuring that notifications are created correctly and template conditions evaluate properly. Configuration migration changes provide a more robust upgrade/downgrade experience for users.

Update to 1.1.2

12 Nov 03:46
Compare
Choose a tag to compare

AI Automation Suggester 1.1.2

🔄 Changes

  • Added configuration version migration support for smoother upgrades and downgrades
  • Improved configuration handling for better stability
  • Added Italian language support
  • Enhanced internationalization (i18n) capabilities

🌍 Translations

  • Added complete Italian (it) translation (Thanks to @l30n4rd086)
  • Includes translations for:
  • Configuration interface
  • Error messages
  • Service descriptions
  • Provider settings

⚙️ Technical Changes

  • Implemented async_migrate_entry to handle configuration version changes (Thanks to @m4rkireland)
  • Removed deprecated scheduling fields (scan_frequency and initial_lag_time) during upgrades
  • Added safety checks for configuration downgrades from future versions
  • Enhanced error handling and logging during migrations

📝 Notes

  • If upgrading from an older version, your configuration will be automatically migrated
  • If downgrading from a future version, the integration will safely handle the configuration changes
  • Users can now use the interface in Italian or German

🐛 Bug Fixes

  • Fixed potential issues with configuration persistence during version changes
  • Improved error handling during configuration updates

👥 Contributors

Special thanks to:

  • @m4rkireland for implementing the configuration migration system
  • @l30n4rd086 for providing the Italian translation

Full changelog: Diff

1.1.1 - HACS Bug

05 Nov 09:43
Compare
Choose a tag to compare

Resolved Versioning issues for HACS increments. Corrected to Version 1

V1.0.9 - Bug Fix

04 Nov 13:07
Compare
Choose a tag to compare

AI Automation Suggester v1.0.9

🔨 Breaking Changes

  • Adopted semantic versioning (changed from decimal versioning like 1.08 to proper semver 1.0.9)
  • Removed legacy scheduling configuration options

🐛 Bug Fixes

  • Fixed migration errors when upgrading from versions 1.06, 1.07, and 1.08
  • Fixed DEFAULT_SCAN_FREQUENCY undefined error during upgrades
  • Fixed configuration migration issues that could cause setup failures
  • Improved error handling during the upgrade process

🔧 Under the Hood

  • Implemented a more robust version migration system
  • Added better version conversion handling for older installations
  • Improved debug logging during migration process
  • Cleaned up legacy configuration fields during upgrade
  • Added safeguards against migration failures

⬆️ Upgrade Notes

This release includes important fixes for users upgrading from previous versions. The upgrade process will:

  • Automatically migrate your existing configuration
  • Remove unused legacy settings
  • Preserve all your provider settings and configurations
  • Fix any inconsistencies from previous versions

No manual intervention is required for the upgrade. Your existing configurations and provider settings will be preserved.

📝 Notes

If you experience any issues during the upgrade, please:

  1. Check the Home Assistant logs for detailed information
  2. Clear browser cache and refresh if the UI shows any inconsistencies
  3. Report any issues on our GitHub issue tracker

If you experience major failures during the upgrade:

  1. Remove all configured AI providers from the integration
  2. Uninstall the integration completely
  3. Restart Home Assistant
  4. Reinstall the integration
  5. Reconfigure your AI providers

This clean installation approach will ensure a fresh start if the migration process encounters any critical issues.

V1.08

03 Nov 09:32
Compare
Choose a tag to compare

What's New in AI Automation Suggester Version 1.08

We are excited to announce the release of version 1.08 of the AI Automation Suggester integration. This update brings several important fixes and enhancements to improve functionality and user experience.

New Features and Improvements

  1. Support for Google Validation in Configuration Flow

    • Description: Added validation support for the Google AI provider during the configuration flow. This ensures that your API key and model configurations are correctly validated when setting up the Google AI provider.
    • Impact: Provides a smoother setup experience and prevents misconfigurations.
    • Time Spent: 3 hours
  2. Adjustable Token Limit for AI Responses

    • Description: Users can now set a custom maximum token limit for AI responses. The default limit remains at 500 tokens, but you can increase it up to 16,384 tokens for models like OpenAI's GPT-4o-mini.
    • Impact: Prevents responses from being cut off due to token limits and allows for more detailed suggestions.
    • Time Spent: 1.5 hours
  3. Improved Endpoint Formatting for LocalAI and Ollama

    • Description: Updated the code to enhance the formatting for LocalAI and Ollama endpoints, ensuring correct API call structures.
    • Default Endpoint Formats:
      • LocalAI: "{protocol}://{ip_address}:{port}/v1/chat/completions"
      • Ollama: "{protocol}://{ip_address}:{port}/api/chat"
    • Impact: Enhances compatibility and reduces errors when using LocalAI and Ollama providers.
    • Time Spent: 10 minutes

Bug Fixes

  1. Fixed Notification Creation Error

    • Issue: An error occurred when creating notifications: "object NoneType can't be used in 'await' expression".
    • Resolution: Adjusted the notification code to correctly handle asynchronous calls.
    • Impact: Notifications are now created without errors, ensuring you receive AI suggestions promptly.
    • Time Spent: 15 minutes
  2. Re-added Upgrade Path Code

    • Issue: The upgrade path code was broken in version 1.07, causing issues when updating from earlier versions.
    • Resolution: Re-implemented the upgrade code to ensure smooth transitions between versions.
    • Impact: Users can now upgrade to the latest version without losing configurations or encountering errors.
    • Time Spent: 20 minutes
  3. Resolved 'Suggestions Available' Status Mismatch

    • Issue: There was a mismatch in the display of the 'suggestions available' status due to code inconsistencies.
    • Resolution: Reworked the sensor code to accurately reflect when new suggestions are available.
    • Impact: Users receive correct status updates regarding the availability of AI suggestions.
    • Time Spent: 30 minutes

Additional Notes

  • Versioning Update

    • Future releases will consider adopting a versioning scheme like 1.0.9 to align with semantic versioning standards.

We appreciate your support and feedback, which help us improve the AI Automation Suggester. For any issues or suggestions, please visit our GitHub repository.


Feel free to reach out if you need further assistance or have any other questions!

Changes, Removals, and Additions:

01 Nov 09:31
Compare
Choose a tag to compare

Removal of Automatic Scheduling:

Removed automatic scanning and suggestion generation due to complexities with triggering and user preferences.
Enhanced Stability: This change improves code stability and allows users to implement custom automation triggers that suit their individual needs.

Expanded AI Provider Support:

Added Support for Multiple LLM Models:
Google LLM Models: Now supports Google's AI models for generating automation suggestions.
Local AI Models: Introduced support for local models like LocalAI and Ollama for users who prefer privacy and do not rely on internet connectivity.

Custom LLM Variants:
Users can now choose custom AI model variants from higher models (e.g., OpenAI's o1-preview), providing more flexibility and control over the AI processing.
Enhanced Manual Trigger Service:

Integration Selection: Users can now select which AI provider integration to trigger when manually initiating the AI analysis.
Custom System Prompt: Allows users to override the built-in system prompt for more granular and personalized suggestions.
German Translation Added:

Global Reach: Introduced German language support to make the integration accessible to a wider audience.

Bug Fixes

22 Oct 12:30
Compare
Choose a tag to compare

Bug Fixes:
This update fixes an issue where users encountered a TypeError when scan_frequency was set to 0. The integration now correctly handles the scenario where automatic updates are disabled, preventing unexpected errors during the data fetch process.