diff --git a/packages/modules/devices/tasmota/tasmota/bat.py b/packages/modules/devices/tasmota/tasmota/bat.py index d38f1a4090..d399f8d81f 100644 --- a/packages/modules/devices/tasmota/tasmota/bat.py +++ b/packages/modules/devices/tasmota/tasmota/bat.py @@ -41,7 +41,7 @@ def update(self): currents = [0.0, 0.0, 0.0] power = float(response['StatusSNS']['ENERGY']['Power']) - currents[self.__phase-1] = (response['StatusSNS']['ENERGY']['Current']), 0.0, 0.0 + currents[self.__phase-1] = float(response['StatusSNS']['ENERGY']['Current']), 0.0, 0.0 imported = float(response['StatusSNS']['ENERGY']['Total']*1000) _, exported = self.sim_counter.sim_count(power) diff --git a/packages/modules/devices/tasmota/tasmota/inverter.py b/packages/modules/devices/tasmota/tasmota/inverter.py index c610831c28..ec593d0506 100644 --- a/packages/modules/devices/tasmota/tasmota/inverter.py +++ b/packages/modules/devices/tasmota/tasmota/inverter.py @@ -41,7 +41,7 @@ def update(self): 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 + currents[self.__phase-1] = float(response['StatusSNS']['ENERGY']['Current']), 0.0, 0.0 _, exported = self.sim_counter.sim_count(power) inverter_state = InverterState(