Skip to content

[UI] EVCS: subscribe to Plug and _PropertyReadOnly only when available#3651

Open
rishabhvaish wants to merge 2 commits intoOpenEMS:developfrom
rishabhvaish:fix/evcs-conditional-channel-subscription
Open

[UI] EVCS: subscribe to Plug and _PropertyReadOnly only when available#3651
rishabhvaish wants to merge 2 commits intoOpenEMS:developfrom
rishabhvaish:fix/evcs-conditional-channel-subscription

Conversation

@rishabhvaish
Copy link
Copy Markdown
Contributor

Fixes #3642

The EVCS flat widget and modal both unconditionally subscribe to the Plug and _PropertyReadOnly channels for every EVCS component. The Plug channel is only defined on the EvcsKeba / EvseKeba interface, and _PropertyReadOnly is only generated for components that have a readOnly configuration 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 existing getState() method already handles a null plug value 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.

… 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
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Unable to read value for Channel [evcs0/Plug]

1 participant