From 13a16f437b39f4b1c8765c561efe22a33e36430b Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 5 May 2020 16:05:35 +0200 Subject: [PATCH] fix eltek battery calc --- hardware/devices/eltek/enexus/snmp/mode/battery.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/devices/eltek/enexus/snmp/mode/battery.pm b/hardware/devices/eltek/enexus/snmp/mode/battery.pm index 48c23c398..c0582dea4 100644 --- a/hardware/devices/eltek/enexus/snmp/mode/battery.pm +++ b/hardware/devices/eltek/enexus/snmp/mode/battery.pm @@ -257,7 +257,7 @@ sub manage_selection { if ($result->{powerSystemCapacityScale} eq 'ah' && defined($current)) { $self->{battery}->{charge_remaining_time} = - int($result->{batteryRemainingCapacityValue} * 3600 / $current * $scale_current); + int(($result->{batteryRemainingCapacityValue} * 3600) / ($current * $scale_current)); } $self->threshold_eltek_configured(