Skip to content

Tasmota: use parser for meter types - #4228

Merged
LKuemmel merged 1 commit into
openWB:masterfrom
LKuemmel:refactor_tasmota
Oct 30, 2026
Merged

LKuemmel merged 1 commit into
openWB:masterfrom
LKuemmel:refactor_tasmota

Conversation

@LKuemmel

Copy link
Copy Markdown
Contributor

No description provided.

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.

🟢 Approval recommended

The review record indicates that no outstanding issues remain, supporting approval of the centralized parser refactor and its accompanying test coverage.

No open issues 🎉

What changed in this PR

This pull request centralizes Tasmota meter parsing and updates the counter, battery, and inverter components to use the shared parser across supported meter types.

Changes:

  • Added TasmotaParser support for ENERGY, Itron, MT681, eBZ, and MT631 responses.
  • Refactored counter, battery, and inverter measurements to consume parsed data.
  • Added tests for meter formats, phase assignment, defaults, filtering, and relay state handling.

The pull request currently has unresolved issues involving eBZ current derivation and fabricated voltages for unmeasured ENERGY phases.

File Description
packages/​modules/​devices/​tasmota/​tasmota/​tasmota_test.py Adds parser and component-level coverage for supported meter types and edge cases.
packages/​modules/​devices/​tasmota/​tasmota/​parser.py Adds shared parsing and default handling for Tasmota meter responses.
packages/​modules/​devices/​tasmota/​tasmota/​inverter.py Uses the shared parser for inverter measurements.
packages/​modules/​devices/​tasmota/​tasmota/​counter.py Uses parsed energy, phase, and power measurements for counter state updates.
packages/​modules/​devices/​tasmota/​tasmota/​bat.py Uses the shared parser for battery measurements.

This pull request requires changes.

Review effort: Lite

@LKuemmel
LKuemmel merged commit 38cbf10 into openWB:master Oct 30, 2026
1 check passed
@LKuemmel LKuemmel mentioned this pull request Oct 30, 2026
@LKuemmel
LKuemmel deleted the refactor_tasmota branch October 30, 2026 11:30
seaspotter added a commit to seaspotter/core that referenced this pull request Oct 31, 2026
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