fix smartwb: start charging after create a new chargepoint#3364
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the SmartWB chargepoint integration to keep reporting a stable phases_in_use value when currents briefly read as zero (e.g., right after creating a new chargepoint / during ramp-up), which helps downstream control logic proceed with charging.
Changes:
- Track
old_phases_in_usein the SmartWB chargepoint module and reuse it when measured phase currents indicate “0 phases in use”. - Update the SmartWB unit test expectation for the “not charging” sample case to match the new
phases_in_usebehavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/modules/chargepoints/smartwb/chargepoint_module.py | Persist and reuse last-known phases_in_use instead of emitting None/0 on zero-current readings and on error fallback. |
| packages/modules/chargepoints/smartwb/smartwb_test.py | Update expected phases_in_use in the “V2 not charging” test fixture to align with the new fallback behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| charge_state=True, | ||
| rfid="0a1b2c3d", | ||
| phases_in_use=None, | ||
| phases_in_use=3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.