Repository navigation
Interner Ladepunkt: vorhandene Fehlermeldung setzen, auch wenn Topics fehlen - #4244
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, and the change preserves existing internal fault information while handling missing MQTT topics appropriately.
No open issues 🎉
What changed in this PR
This follow-up updates the external openWB chargepoint module so an existing internal chargepoint fault is preserved and reported even when required MQTT topics are missing.
Changes:
- Stores the chargepoint state within the protected parsing block.
- Uses optional lookups for
fault_stateandfault_str. - Reports missing required topics only when no existing internal fault is available.
| File | Description |
|---|---|
| packages/modules/chargepoints/external_openwb/chargepoint_module.py | Handles missing MQTT topics while preserving and reporting existing internal chargepoint fault information. |
Review effort: Lite
LKuemmel
marked this pull request as ready for review
November 11, 2026 10:47
Reviewer's GuideImplementationSpeichert den Ladepunkt-Zustand vor der Prüfung auf fehlende Topics und gibt bei vorhandenem Fehlerstatus stattdessen die vorhandene Fehlermeldung aus.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="packages/modules/chargepoints/external_openwb/chargepoint_module.py" line_range="109" />
<code_context>
except KeyError as e:
- raise KeyError(f"Es wurden nicht alle notwendigen Daten empfangen: {e}")
- self.store.set(chargepoint_state)
+ if received_topics.get(f"{topic_prefix}fault_state", 0) == 2:
+ self.fault_state.error(received_topics.get(
+ f"{topic_prefix}fault_str", "Fehlerstatus vom internen Ladepunkt"))
</code_context>
<issue_to_address>
**Stale chargepoint readings persist**
When fault_state is 2, required state topics are missing, and an earlier read stored valid state, `get_values` treats the `KeyError` as success and resets the error timer without calling `self.store.set`; repeated polls never reach the timeout fallback, so callers keep seeing the previous `ChargepointState` as current.
Keep incomplete fault responses on the error path so repeated missing-topic polls reach the timeout fallback and clear the stored state.
Also at `packages/modules/chargepoints/external_openwb/chargepoint_module.py:113`.
</issue_to_address>
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.
Folge-PR zu #3970
Summary by Sourcery
Bug Fixes: