From f4ae5912f7c7145849ae7fae276e89771150820a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 19 Nov 2021 16:11:48 +0100 Subject: [PATCH] Fix solar edge initial connected state --- sunspec/integrationpluginsunspec.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sunspec/integrationpluginsunspec.cpp b/sunspec/integrationpluginsunspec.cpp index 4a45689..d93af6c 100644 --- a/sunspec/integrationpluginsunspec.cpp +++ b/sunspec/integrationpluginsunspec.cpp @@ -98,7 +98,6 @@ void IntegrationPluginSunSpec::init() m_connectedStateTypeIds.insert(sunspecSinglePhaseMeterThingClassId, sunspecSinglePhaseMeterConnectedStateTypeId); m_connectedStateTypeIds.insert(sunspecSplitPhaseMeterThingClassId, sunspecSplitPhaseMeterConnectedStateTypeId); m_connectedStateTypeIds.insert(sunspecThreePhaseMeterThingClassId, sunspecThreePhaseMeterConnectedStateTypeId); - m_connectedStateTypeIds.insert(solarEdgeBatteryThingClassId, solarEdgeBatteryConnectedStateTypeId); // Params for sunspec things m_modelIdParamTypeIds.insert(sunspecSinglePhaseInverterThingClassId, sunspecSinglePhaseInverterThingModelIdParamTypeId); @@ -690,6 +689,8 @@ void IntegrationPluginSunSpec::setupSolarEdgeBattery(ThingSetupInfo *info) m_sunSpecThings.insert(thing, battery); connect(battery, &SolarEdgeBattery::blockDataUpdated, this, &IntegrationPluginSunSpec::onSolarEdgeBatteryBlockUpdated); info->finish(Thing::ThingErrorNoError); + // Set up successfully, init done, we are connected for sure + thing->setSettingValue(solarEdgeBatteryConnectedStateTypeId, true); }); // Start initializing battery data