Skip to content

Planner: drop deprecated publishing keys #2 (BC)#26540

Merged
andig merged 32 commits intoevcc-io:masterfrom
iseeberg79:feat/ps-2
Feb 1, 2026
Merged

Planner: drop deprecated publishing keys #2 (BC)#26540
andig merged 32 commits intoevcc-io:masterfrom
iseeberg79:feat/ps-2

Conversation

@iseeberg79
Copy link
Copy Markdown
Contributor

@iseeberg79 iseeberg79 commented Jan 8, 2026

Follow-up to #24423, depends on #26291
based on #26293

TODO:

  • UI

@evcc-bot evcc-bot added the enhancement New feature or request label Jan 8, 2026
@iseeberg79
Copy link
Copy Markdown
Contributor Author

@naltatis had no write access

Comment thread core/keys/loadpoint.go Outdated
Comment thread core/site_vehicles.go Outdated
Co-authored-by: Michael Geers <michael@geers.tv>
Comment thread assets/js/components/ChargingPlans/PlansSettings.vue Outdated
Comment thread assets/js/components/ChargingPlans/PlansSettings.vue Outdated
@github-actions github-actions Bot added the stale Outdated and ready to close label Jan 17, 2026
@andig andig removed the stale Outdated and ready to close label Jan 17, 2026
@iseeberg79
Copy link
Copy Markdown
Contributor Author

@naltatis looks consistent to me and is working properly for soc-based and energy-based plans,
found and solved a bug on not having published the data on close of energy-based modal resulting in persisted (database) but not updated (ui) strategy

@andig andig marked this pull request as ready for review February 1, 2026 12:33
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In Site.publishVehicles you changed lp.PublishEffectiveValues() from asynchronous to synchronous; please double-check that this cannot block the polling loop or introduce lock contention in cases where PublishEffectiveValues does more work in the future, and consider keeping it async while explicitly publishing only the strategy synchronously if immediate strategy availability is the main concern.
  • The PlanStrategy custom MarshalJSON/UnmarshalJSON convert Precondition to seconds and back; it might be worth clarifying in the struct comment that the internal time.Duration is expected to be in whole seconds and guarding against sub-second values being silently truncated.
  • In core/vehicle/adapter.go the log line in SetPlanStrategy was removed; if this was useful for diagnosing planning issues, consider keeping a concise debug log (perhaps only when values actually change) instead of dropping it entirely.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `Site.publishVehicles` you changed `lp.PublishEffectiveValues()` from asynchronous to synchronous; please double-check that this cannot block the polling loop or introduce lock contention in cases where `PublishEffectiveValues` does more work in the future, and consider keeping it async while explicitly publishing only the strategy synchronously if immediate strategy availability is the main concern.
- The `PlanStrategy` custom `MarshalJSON`/`UnmarshalJSON` convert `Precondition` to seconds and back; it might be worth clarifying in the struct comment that the internal `time.Duration` is expected to be in whole seconds and guarding against sub-second values being silently truncated.
- In `core/vehicle/adapter.go` the log line in `SetPlanStrategy` was removed; if this was useful for diagnosing planning issues, consider keeping a concise debug log (perhaps only when values actually change) instead of dropping it entirely.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread api/plans.go
Comment thread core/loadpoint_api.go Outdated
Comment thread core/site_vehicles.go
@andig andig merged commit e1accfe into evcc-io:master Feb 1, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants