Make huawei inverter power independent from the battery power

pull/77/head
Simon Stürz 2022-08-09 11:16:28 +02:00
parent 761ff94610
commit 225fa3ed84
1 changed files with 6 additions and 2 deletions

View File

@ -439,9 +439,13 @@ void IntegrationPluginHuawei::setupFusionSolar(ThingSetupInfo *info)
}
});
connect(connection, &HuaweiFusionSolar::inverterActivePowerChanged, this, [thing](float inverterActivePower){
connect(connection, &HuaweiFusionSolar::inverterActivePowerChanged, this, [](float inverterActivePower){
qCDebug(dcHuawei()) << "Inverter power changed" << inverterActivePower * -1000.0 << "W";
thing->setStateValue(huaweiFusionSolarInverterCurrentPowerStateTypeId, inverterActivePower * -1000.0);
});
connect(connection, &HuaweiFusionSolar::actualInverterPowerChanged, this, [thing](float actualInverterPower){
qCDebug(dcHuawei()) << "Inverter actual power changed" << actualInverterPower << "W";
thing->setStateValue(huaweiFusionSolarInverterCurrentPowerStateTypeId, actualInverterPower);
});
connect(connection, &HuaweiFusionSolar::inverterDeviceStatusChanged, this, [thing](HuaweiFusionSolar::InverterDeviceStatus inverterDeviceStatus){