Skip to content

Decouple octopus direct from Predbat using database - #2825

Merged
springfall2008 merged 7 commits into
mainfrom
fixes8
Oct 25, 2025
Merged

springfall2008 merged 7 commits into
mainfrom
fixes8

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR decouples Octopus Direct from Predbat by implementing database-based entity storage, enabling Predbat to consume Octopus data through entities rather than direct API coupling. The changes introduce automatic configuration of entities, support for setting intelligent charging targets through entities, and improved command processing.

Key Changes:

  • Added automatic entity configuration system that populates Predbat's arguments with dynamically generated entity names
  • Implemented entity-based controls for intelligent charging (target time/SOC) and saving session management
  • Refactored rate data storage to use structured list format with start/end timestamps instead of dictionary keys

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
apps/predbat/octopus.py Core changes implementing entity-based interface, command queue system, automatic configuration, and intelligent charging controls
apps/predbat/predbat.py Added tracking for saving session join attempts to prevent spam
apps/predbat/fetch.py Removed direct Octopus API coupling, now exclusively uses entity-based data access
apps/predbat/web.py Updated regex pattern and entity type checks to support new entity types
apps/predbat/components.py Added automatic configuration option for Octopus component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/predbat/octopus.py
Comment thread apps/predbat/octopus.py
Comment thread apps/predbat/fetch.py Outdated
Comment thread apps/predbat/octopus.py
Comment thread apps/predbat/octopus.py Outdated
@springfall2008
springfall2008 merged commit a4e952f into main Oct 25, 2025
1 check passed
@springfall2008
springfall2008 deleted the fixes8 branch October 25, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants