Repository navigation
Fix: Verbraucher-Temperaturen als None publiziert, statt nur bei vorhandenem Wert - #4272
Merged
LKuemmel merged 1 commit intoNov 6, 2026
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRestores the temperature availability guard so consumers without temperature data no longer publish Sequence diagram for guarded consumer temperature publicationsequenceDiagram
participant ConsumerStore
participant Broker
participant Validator
ConsumerStore->>ConsumerStore: update()
alt temperatures is not None
ConsumerStore->>Broker: pub_to_broker(temperatures)
Broker->>Validator: validate(list[float])
else temperatures is None
ConsumerStore-->>Broker: No publication
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
LKuemmel
approved these changes
Nov 6, 2026
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.
Problem
Bei jedem Zyklus wird dieser Fehler geloggt, sobald ein Verbraucher keine Temperaturen liefert (bei mir: Wärmepumpe, Verbraucher 15):
Payload ungültig: Topic 'openWB/set/consumer/15/get/temperatures', Payload 'None' sollte eine Kollektion vom Typ <class 'list'> sein und nur Elemente vom Typ <class 'float'> enthalten.Mit Abstand die häufigste Fehlermeldung in meinem Log - über 8000 mal am Tag...
Ursache
#4196 hat den Guard
if self.state.temperatures is not None:entfernt, damit das Topic laut PR-Beschreibung "beim Hinzufügen" existiert. Das wird aber bereits unabhängig davon incommand.pyerledigt - dort publiziertadd_consumerjedes Feld ausConsumerGet()(inkl.temperatures=None) einmalig direkt beim Anlegen. Der entfernte Guard in_consumer.pywar damit für das eigentliche Ziel der PR unnötig und sorgt seitdem nur noch dafür, dass bei jedem ZyklusNonean die Validierung insetdata.py(collection=list, akzeptiert nieNone) geschickt wird - für jeden Verbraucher ohne Temperaturdaten, nicht nur für Shelly-Geräte ohne Sensor.Der automatische Review auf #4196 hat genau das zweimal bemängelt ("Avoid publishing null temperatures for unsupported consumers"), wurde vor dem Merge aber nicht behoben.
Fix
Stellt den ursprünglichen Guard wieder her.
Summary by Sourcery
Bug Fixes: