Register OHPCF event handler in constructor#228
Open
andig wants to merge 3 commits into
Open
Conversation
NewOHPCF never subscribed the concrete *OHPCF to the device event bus, so only the embedded UseCaseBase.HandleEvent ran (firing UseCaseSupportUpdate). OHPCF.HandleEvent — which subscribes/binds SmartEnergyManagementPs on entity add and processes the data updates — was never invoked, so a CEM received no process-state data and could not schedule the compressor. Add the localEntity.Device().Events().Subscribe(uc) call that every other use case constructor already performs.
Contributor
Author
|
@sthelen-enqs this is an actual bug with #223 |
andig
added a commit
to evcc-io/evcc
that referenced
this pull request
Jun 25, 2026
Point eebus-go at andig/eebus-go fix branch (enbility/eebus-go#228) which registers the OHPCF use case event handler, so the compressor's SmartEnergyManagementPs feature is actually subscribed and process-state updates arrive. Revert to an upstream pseudo-version once #228 lands.
A subscription only delivers future updates, so without an initial read the CEM never learns the current optional power consumption until the heat pump pushes a change. Request the data on connect, as the other use cases do.
andig
added a commit
to evcc-io/evcc
that referenced
this pull request
Jun 25, 2026
Pick up enbility/eebus-go#228 follow-up that reads the OHPCF data on connect so the compressor's process state is populated instead of staying empty.
andig
commented
Jun 25, 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.
NewOHPCFis the only use-case constructor in this repo that does not subscribe the concrete use case to the device event bus.NewUseCaseBaseonly subscribes the embedded*UseCaseBase, whoseHandleEventhandles use-case-data updates (firingUseCaseSupportUpdate).OHPCF.HandleEvent— which on entity-add callsconnected()toSubscribe()/Bind()the remoteSmartEnergyManagementPsfeature, and on data change runsloadSmartEnergyManagementPsDataTypeto emit theDataUpdate*events — is therefore never registered and never runs.Add the same
_ = localEntity.Device().Events().Subscribe(uc)call toNewOHPCF.Also added requesting initial data same als LPC does.
🤖 Generated with Claude Code