From f1eb02c72294973ca7694db2dd5206396483fa94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 6 May 2024 16:40:37 +0200 Subject: [PATCH] AmtronECU: fix charging state for firmware version < 5.22 --- mennekes/integrationpluginmennekes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mennekes/integrationpluginmennekes.cpp b/mennekes/integrationpluginmennekes.cpp index 8538670..51d6d12 100644 --- a/mennekes/integrationpluginmennekes.cpp +++ b/mennekes/integrationpluginmennekes.cpp @@ -646,6 +646,8 @@ void IntegrationPluginMennekes::setupAmtronECUConnection(ThingSetupInfo *info) } thing->setStateValue(amtronECUCurrentPowerStateTypeId, totalPower); + thing->setStateValue(amtronECUChargingStateTypeId, totalPower > 0); + double totalEnergy = 0; // Wh if (amtronECUConnection->meterEnergyL1() != 0xffffffff) {