From d0bf7055ef93c57df1f1de59aecb0f76870f800f Mon Sep 17 00:00:00 2001 From: ndrsnhs Date: Wed, 4 Mar 2026 08:36:03 +0100 Subject: [PATCH] correct data type --- packages/modules/devices/tasmota/tasmota/bat.py | 2 +- packages/modules/devices/tasmota/tasmota/inverter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(