Skip to content

Conversation

@bpulluta
Copy link
Collaborator

@bpulluta bpulluta commented Oct 2, 2025

Please check if the PR fulfills these requirements

  • CHANGELOG.md is updated
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Any new Django model inputs have also been added to job/test/posts/all_inputs_test.json

What kind of change does this PR introduce?

(Bug fix, feature, docs update, ...)

  • Simplified /ensite UI-to-EnLitePy translation.
  • Enforces single keys: pChgMax_kW (vehicles), pChgCap_kW (EMS override).
  • Deterministic EMS capacity derivation (sum of charger count * power_kW) when no override.
  • Remove ambiguity and unused legacy paths.
  • Make max charging power changes reliably propagate.
  • Provide on-demand introspection without bloating default responses.

What is the current behavior?

(You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change?

(What changes might users need to make in their application due to this PR?)

Other information:

Copy link
Contributor

Copilot AI left a comment

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 refactors the EnSite payload builder for translating UI inputs to EnLitePy format. The changes simplify the schema by enforcing single-purpose keys and improve deterministic behavior for EMS capacity derivation.

Key changes:

  • Simplified UI schema with single-purpose field enforcement (pChgMax_kW for vehicles, pChgCap_kW for EMS)
  • Deterministic EMS capacity auto-derivation from charger configurations when no override provided
  • Added optional debug payload echo feature for troubleshooting

Reviewed Changes

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

File Description
load_builder/views.py Major refactoring of payload builder with simplified validation, deterministic capacity derivation, and debug features
CHANGELOG.md Documentation of changes including schema version bump and new debug functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@bpulluta bpulluta merged commit 599fbe2 into develop Oct 2, 2025
@bpulluta bpulluta deleted the ev-ensite-fix branch October 2, 2025 20:32
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.

3 participants