Skip to content

Verbraucher Simcount: Zählerstände aus Broker laden - #4123

Merged
LKuemmel merged 3 commits into
openWB:masterfrom
LKuemmel:consumer_dev
Oct 16, 2026
Merged

LKuemmel merged 3 commits into
openWB:masterfrom
LKuemmel:consumer_dev

Conversation

@LKuemmel

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread packages/helpermodules/subdata.py
Comment thread packages/modules/common/configurable_consumer.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@LKuemmel
LKuemmel merged commit 325de57 into openWB:master Oct 16, 2026
1 check passed
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.

2 participants