AmtronECU: fix charging state for firmware version < 5.22

master
Simon Stürz 2024-05-06 16:40:37 +02:00
parent 25671f284b
commit f1eb02c722
1 changed files with 2 additions and 0 deletions

View File

@ -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) {