Repository navigation
Verbraucher Simcount: Zählerstände aus Broker laden - #4123
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The fallback can overwrite measured energy totals, and missing control-state subscriptions can prevent consumer switching delays from progressing.
2 open findings
What changed in this PR
This PR centralizes consumer energy simulation and restores saved counter state from the MQTT broker.
Changes:
- Move simulation fallback from individual integrations into
ConfigurableConsumer. - Restore consumer simulation state through broker subscriptions.
- Add coverage for restoring consumer energy totals.
| File | Description |
|---|---|
| packages/modules/consumers/xtherma/xtherma/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/stiebel/stiebel/consumer.py | Remove unused local simulator. |
| packages/modules/consumers/solvis/solvis/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/solarfocus/vampair/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/shelly/shelly_pm/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/shelly/shelly_em/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/ratiotherm/ratiotherm/consumer.py | Remove unused local simulator. |
| packages/modules/consumers/ovum/ovum/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/nibe/nibe_s_series/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/mystrom/mystrom/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/my_pv/elwa_e/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/my_pv/acthor/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/mtec/mtec/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/luxtronik/luxtronik/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/lg_therma/lg_therma/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/lambda_/lambda_/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/kermi/kermi/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/idm/idm/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/generic/mqtt/consumer.py | Remove local simulation fallback. |
| packages/modules/consumers/generic/json/consumer.py | Return defaults for missing counters. |
| packages/modules/consumers/generic/http/consumer.py | Handle missing counter readers centrally. |
| packages/modules/consumers/generic/dac/consumer.py | Remove unused local simulator. |
| packages/modules/consumers/ems_esp/ems_esp/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/ego/ego/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/daikin/daikin_homehub_altherma/consumer.py | Delegate simulation to shared handling. |
| packages/modules/consumers/askoma/askoheat/consumer.py | Delegate simulation to shared handling. |
| packages/modules/common/simcount/_simcounter.py | Reorder typing imports only. |
| packages/modules/common/simcount/_simcounter_store.py | Restore energy using consumer-specific lookup. |
| packages/modules/common/simcount/_simcounter_store_test.py | Test consumer energy restoration. |
| packages/modules/common/configurable_consumer.py | Centralize simulation fallback and remove injection helper. |
| packages/helpermodules/subdata.py | Narrow subscriptions and load simulation state. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

#3908 (reply in thread)