[UI] EVCS: subscribe to Plug and _PropertyReadOnly only when available#3651
Open
rishabhvaish wants to merge 2 commits intoOpenEMS:developfrom
Open
[UI] EVCS: subscribe to Plug and _PropertyReadOnly only when available#3651rishabhvaish wants to merge 2 commits intoOpenEMS:developfrom
rishabhvaish wants to merge 2 commits intoOpenEMS:developfrom
Conversation
… available The EVCS flat and modal widgets unconditionally subscribe to Plug and _PropertyReadOnly channels. Plug only exists on Keba chargers, and _PropertyReadOnly only on components with a readOnly config property, so non-Keba EVCS devices generate repeated warnings in the log. Check component channel metadata before subscribing.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3651 +/- ##
=============================================
+ Coverage 59.93% 59.96% +0.03%
Complexity 104 104
=============================================
Files 3191 3191
Lines 140414 140414
Branches 10254 10254
=============================================
+ Hits 84146 84187 +41
+ Misses 53143 53085 -58
- Partials 3125 3142 +17 🚀 New features to boost your workflow:
|
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.
Fixes #3642
The EVCS flat widget and modal both unconditionally subscribe to the
Plugand_PropertyReadOnlychannels for every EVCS component. ThePlugchannel is only defined on theEvcsKeba/EvseKebainterface, and_PropertyReadOnlyis only generated for components that have areadOnlyconfiguration property (Keba, go-e). Any EVCS that lacks these channels — simulators, ABL, Mennekes, Heidelberg, etc. — produces repeated "Unable to read value for Channel" warnings in the log every time the widget refreshes.I've added a guard that checks the component's channel metadata (
this.component.channels?.["..."]) before subscribing. The existinggetState()method already handles a nullplugvalue gracefully, so the UI behavior is unchanged — the only difference is the backend no longer receives subscription requests for channels that don't exist.Tested by verifying the Angular lint passes (
ng lint) with no errors on the changed files.