Repository navigation
Tasmota: use parser for meter types - #4228
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 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
TasmotaParsersupport 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
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.
No description provided.