Skip to content

Commit

Permalink
Update to 1.06
Browse files Browse the repository at this point in the history
  • Loading branch information
ITSpecialist111 committed Oct 22, 2024
1 parent 232c8b9 commit 0a43bda
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/ai_automation_suggester/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class AIAutomationConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for AI Automation Suggester."""

VERSION = 1.05
VERSION = 1.06

async def async_step_user(self, user_input=None):
"""Handle the initial step."""
Expand Down
5 changes: 3 additions & 2 deletions custom_components/ai_automation_suggester/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ async def _async_update_data(self):
"""Fetch data from AI model."""
current_time = datetime.now()

# Check if scan frequency has passed
if self.last_update and current_time - self.last_update < self.update_interval:
# Check if scan frequency has passed, but only if update_interval is not None
if self.update_interval is not None and self.last_update and current_time - self.last_update < self.update_interval:
_LOGGER.debug("Skipping update, scan frequency interval not reached.")
return self.previous_entities # Return previous data without update

Expand Down Expand Up @@ -80,6 +80,7 @@ async def _async_update_data(self):
return suggestions



def get_ai_suggestions(self, ai_input_data):
"""Process data with AI model."""
use_local_ai = self.entry.data.get("use_local_ai", False)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ai_automation_suggester/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/ITSpecialist111/ai_automation_suggester/issues",
"requirements": ["openai>=1.0.0,<2.0.0"],
"version": "1.05"
"version": "1.06"
}

0 comments on commit 0a43bda

Please sign in to comment.