Skip to content

Tasmota: add types - #3295

Merged
LKuemmel merged 4 commits into
openWB:masterfrom
ndrsnhs:tasmota-c2dc44-7236
May 20, 2026
Merged

LKuemmel merged 4 commits into
openWB:masterfrom
ndrsnhs:tasmota-c2dc44-7236

Conversation

@ndrsnhs

@ndrsnhs ndrsnhs commented Apr 14, 2026

Copy link
Copy Markdown
Contributor
  • Vorhandene Typen auch für Speicher- und Wechselrichter-Zähler implementieren
  • Neuen Tasmota Typ c2dc44 hinzugefügt

@LKuemmel
LKuemmel requested a review from Copilot May 19, 2026 13:51
@LKuemmel LKuemmel added this to the 2.2.0-Patch.1 milestone May 19, 2026

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.

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, MT681 und eBZ-Payloads ergänzt und State-Erzeugung vereinheitlicht.
  • Tasmota-Batterie: Unterstützung für Itron, MT681 und eBZ-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'])]

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.

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.0 erzeugt ein Tuple statt eines Float-Werts pro Phase (durch das Komma nach dem ersten Ausdruck) und es fehlt eine float()-Konvertierung. Erwartet wird eine Liste von 3 Float-Strömen; setze daher nur den numerischen Wert für die aktuelle Phase (wie in counter.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)

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

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
LKuemmel merged commit def0c2e into openWB:master May 20, 2026
5 checks passed
ndrsnhs added a commit to ndrsnhs/core that referenced this pull request Aug 24, 2026
* add tasmota types

* set values directly

* initialize currents

* fix
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.

3 participants