From 225fa3ed84602f49aafe63485f05eb48886e4ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Tue, 9 Aug 2022 11:16:28 +0200 Subject: [PATCH] Make huawei inverter power independent from the battery power --- huawei/integrationpluginhuawei.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/huawei/integrationpluginhuawei.cpp b/huawei/integrationpluginhuawei.cpp index 928fdf0..a759e79 100644 --- a/huawei/integrationpluginhuawei.cpp +++ b/huawei/integrationpluginhuawei.cpp @@ -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){