Repository navigation
Tasmota: add types - #3295
Merged
Merged
Tasmota: add types#3295
Conversation
ndrsnhs
commented
Apr 14, 2026
Contributor
- Vorhandene Typen auch für Speicher- und Wechselrichter-Zähler implementieren
- Neuen Tasmota Typ c2dc44 hinzugefügt
LKuemmel
approved these changes
Apr 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Erweitert die Tasmota-Integration um zusätzliche Zählertypen, sodass bestehende Typen nun auch für Speicher- und Wechselrichter-Zähler nutzbar sind (inkl. neuem Typ „eBZ“ laut Beschreibung).
Changes:
- Tasmota-Inverter: Unterstützung für
Itron,MT681undeBZ-Payloads ergänzt und State-Erzeugung vereinheitlicht. - Tasmota-Batterie: Unterstützung für
Itron,MT681undeBZ-Payloads ergänzt und State-Erzeugung vereinheitlicht. - Tasmota-Zähler:
eBZ-Payload inkl. optionaler phasenweiser Leistungswerte (36_7_0,56_7_0,76_7_0) ergänzt.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/modules/devices/tasmota/tasmota/inverter.py | Neue StatusSNS-Typen für Inverter ergänzt und State-Aufbau vereinheitlicht. |
| packages/modules/devices/tasmota/tasmota/counter.py | eBZ-Zählertyp inkl. optionaler per-Phase-Powers ergänzt. |
| packages/modules/devices/tasmota/tasmota/bat.py | Neue StatusSNS-Typen für Batterie/Speicher ergänzt und State-Aufbau vereinheitlicht. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+55
to
+59
| power = float(response['StatusSNS']['MT681']['Watt_summe']) | ||
| exported = float(response['StatusSNS']['MT681']['Total_out']*1000) | ||
| _, exported = self.peak_filter.check_values(power, None, exported) | ||
| elif 'eBZ' in response['StatusSNS']: | ||
| power = float(response['StatusSNS']['eBZ']['Power']) |
Comment on lines
+65
to
+70
| inverter_state = InverterState( | ||
| power=power, | ||
| exported=exported | ||
| ) | ||
| if 'currents' in locals(): | ||
| inverter_state.currents = currents |
Comment on lines
+69
to
+75
| bat_state = BatState( | ||
| power=power, | ||
| imported=imported, | ||
| exported=exported | ||
| ) | ||
| if 'currents' in locals(): | ||
| bat_state.currents = currents |
Comment on lines
+68
to
+80
| powers = [0.0, 0.0, 0.0] | ||
| power = float(response['StatusSNS']['eBZ']['Power']) | ||
| imported = float(response['StatusSNS']['eBZ']['E_in']*1000) | ||
| exported = float(response['StatusSNS']['eBZ']['E_out']*1000) | ||
| imported, exported = self.peak_filter.check_values(power, imported, exported) | ||
| if ( | ||
| '36_7_0' in response['StatusSNS']['eBZ'] and | ||
| '56_7_0' in response['StatusSNS']['eBZ'] and | ||
| '76_7_0' in response['StatusSNS']['eBZ'] | ||
| ): | ||
| powers = [float(response['StatusSNS']['eBZ']['36_7_0']), | ||
| float(response['StatusSNS']['eBZ']['56_7_0']), | ||
| float(response['StatusSNS']['eBZ']['76_7_0'])] |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
packages/modules/devices/tasmota/tasmota/inverter.py:46
- Die Zuweisung
currents[self.__phase-1] = (response['...']['Current']), 0.0, 0.0erzeugt ein Tuple statt eines Float-Werts pro Phase (durch das Komma nach dem ersten Ausdruck) und es fehlt einefloat()-Konvertierung. Erwartet wird eine Liste von 3 Float-Strömen; setze daher nur den numerischen Wert für die aktuelle Phase (wie incounter.py).
power = float(response['StatusSNS']['ENERGY']['Power']) * -1
currents[self.__phase-1] = (response['StatusSNS']['ENERGY']['Current']), 0.0, 0.0
| currents = [0.0, 0.0, 0.0] | ||
|
|
||
| power = float(response['StatusSNS']['ENERGY']['Power']) * -1 | ||
| currents[self.__phase-1] = (response['StatusSNS']['ENERGY']['Current']), 0.0, 0.0 |
Comment on lines
47
to
49
| power = float(response['StatusSNS']['ENERGY']['Power']) | ||
| currents[self.__phase-1] = (response['StatusSNS']['ENERGY']['Current']), 0.0, 0.0 | ||
| imported = float(response['StatusSNS']['ENERGY']['Total']*1000) |
| exported = float(response['StatusSNS']['eBZ']['E_out']*1000) | ||
| _, exported = self.peak_filter.check_values(power, None, exported) | ||
| else: | ||
| raise ValueError("Nicht unterstützter Tasmota Zählertyp. Bitte an den Support wenden.") |
| float(response['StatusSNS']['eBZ']['56_7_0']), | ||
| float(response['StatusSNS']['eBZ']['76_7_0'])] | ||
| else: | ||
| raise ValueError("Nicht unterstützter Tasmota Zählertyp. Bitte an den Support wenden.") |
| exported = float(response['StatusSNS']['eBZ']['E_out']*1000) | ||
| imported, exported = self.peak_filter.check_values(power, imported, exported) | ||
| else: | ||
| raise ValueError("Nicht unterstützter Tasmota Zählertyp. Bitte an den Support wenden.") |
LKuemmel
approved these changes
May 20, 2026
ndrsnhs
added a commit
to ndrsnhs/core
that referenced
this pull request
Aug 24, 2026
* add tasmota types * set values directly * initialize currents * fix
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.