ITSpecialist111 / ai_automation_suggester

This custom Home Assistant integration periodically scans entities, detects new devices, and uses AI (via OpenAI's API) to suggest automations. It provides a user-friendly interface for accepting or rejecting automations, with placeholder entity mapping for privacy. This aims to enhance smart home automation via AI to identify new automations.
MIT License
7 stars 0 forks source link

HA restart triggers action #3

Open tjorim opened 2 days ago

tjorim commented 2 days ago

When restarting HA (or reloading the integration) it gets triggered and creates a new persistent notification, even when the set scan frequency hasn't passed.

ITSpecialist111 commented 1 day ago

Hi @tjorim,

Thank you for bringing this up!

I’m pleased to let you know that in the latest release (v1.04), we’ve addressed this issue. The integration now checks whether the configured scan_frequency has passed before triggering a new persistent notification when restarting Home Assistant or reloading the integration. This should prevent unnecessary notifications from being generated when no new scan is required.

ITSpecialist111 commented 5 hours ago

I can see this has come back after the code review. Will look to resolve this with better frequency settings as they may chew through GPT tokens.