diff --git a/packages/modules/devices/tasmota/tasmota/bat.py b/packages/modules/devices/tasmota/tasmota/bat.py index 71d1971a13..891bfb26a8 100644 --- a/packages/modules/devices/tasmota/tasmota/bat.py +++ b/packages/modules/devices/tasmota/tasmota/bat.py @@ -51,8 +51,12 @@ def update(self): _, exported = self.sim_counter.sim_count(power) elif 'Itron' in response['StatusSNS']: power = float(response['StatusSNS']['Itron']['Power']) - imported = float(response['StatusSNS']['Itron']['E_in']*1000) - exported = float(response['StatusSNS']['Itron']['E_out']*1000) + if 'E_in' in response['StatusSNS']['Itron']: + imported = float(response['StatusSNS']['Itron']['E_in']*1000) + exported = float(response['StatusSNS']['Itron']['E_out']*1000) + else: + imported = float(response['StatusSNS']['Itron']['ImportActive']*1000) + exported = float(response['StatusSNS']['Itron']['ExportActive']*1000) imported, exported = self.peak_filter.check_values(power, imported, exported) elif 'MT681' in response['StatusSNS']: power = float(response['StatusSNS']['MT681']['Watt_summe']) diff --git a/packages/modules/devices/tasmota/tasmota/counter.py b/packages/modules/devices/tasmota/tasmota/counter.py index 76c9713bf1..20d8eb1964 100644 --- a/packages/modules/devices/tasmota/tasmota/counter.py +++ b/packages/modules/devices/tasmota/tasmota/counter.py @@ -60,8 +60,12 @@ def update(self): _, exported = self.sim_counter.sim_count(power) elif 'Itron' in response['StatusSNS']: power = float(response['StatusSNS']['Itron']['Power']) - imported = float(response['StatusSNS']['Itron']['E_in']*1000) - exported = float(response['StatusSNS']['Itron']['E_out']*1000) + if 'E_in' in response['StatusSNS']['Itron']: + imported = float(response['StatusSNS']['Itron']['E_in']*1000) + exported = float(response['StatusSNS']['Itron']['E_out']*1000) + else: + imported = float(response['StatusSNS']['Itron']['ImportActive']*1000) + exported = float(response['StatusSNS']['Itron']['ExportActive']*1000) imported, exported = self.peak_filter.check_values(power, imported, exported) elif 'MT681' in response['StatusSNS']: power = float(response['StatusSNS']['MT681']['Watt_summe']) diff --git a/packages/modules/devices/tasmota/tasmota/inverter.py b/packages/modules/devices/tasmota/tasmota/inverter.py index e9cfec178c..abb61627da 100644 --- a/packages/modules/devices/tasmota/tasmota/inverter.py +++ b/packages/modules/devices/tasmota/tasmota/inverter.py @@ -49,7 +49,10 @@ def update(self): _, exported = self.sim_counter.sim_count(power) elif 'Itron' in response['StatusSNS']: power = float(response['StatusSNS']['Itron']['Power']) * -1 - exported = float(response['StatusSNS']['Itron']['E_out']*1000) + if 'E_in' in response['StatusSNS']['Itron']: + exported = float(response['StatusSNS']['Itron']['E_out']*1000) + else: + exported = float(response['StatusSNS']['Itron']['ExportActive']*1000) _, exported = self.peak_filter.check_values(power, None, exported) elif 'MT681' in response['StatusSNS']: power = float(response['StatusSNS']['MT681']['Watt_summe']) * -1