Skip to content

Add automated spot-market price threshold optimizer and DWD weather forecast modules#11

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/add-price-threshold-adjustment-module
Draft

Add automated spot-market price threshold optimizer and DWD weather forecast modules#11
Copilot wants to merge 4 commits into
mainfrom
copilot/add-price-threshold-adjustment-module

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

  • Identify root causes of stale thresholds after first launch
  • Switch to loop_start() + on_connect callback so the client reconnects and re-subscribes automatically after any connection drop
  • Fix get_future_prices() filter from start_timestamp >= now_ms to end_timestamp > now_ms so the currently-active price slot is included as a recharge opportunity; add key-presence guard
  • Wrap calculate_thresholds() calls (main loop + on_message + on_connect) in try/except so a transient error doesn't crash the process or silently skip future recalculations
  • Update README to reflect the connection-resilience improvement

…tic consumption

Agent-Logs-Url: https://github.com/jsphuebner/esp-egycounter/sessions/0979a95c-77c1-4882-ae21-66e209e678c5

Co-authored-by: jsphuebner <3882041+jsphuebner@users.noreply.github.com>
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