From a61e6fd2441af6271b746f4ed60e11024ffd0d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 7 Jun 2021 17:15:39 +0200 Subject: [PATCH] Fix handling of IP address changes --- keba/integrationpluginkeba.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/keba/integrationpluginkeba.cpp b/keba/integrationpluginkeba.cpp index 418cc6bb..84ebb1dc 100644 --- a/keba/integrationpluginkeba.cpp +++ b/keba/integrationpluginkeba.cpp @@ -291,6 +291,12 @@ void IntegrationPluginKeba::searchNetworkDevices() if (existingThing->paramValue(wallboxThingIpAddressParamTypeId).toString() != networkDevice.address().toString()) { qCDebug(dcKebaKeContact()) << "Keba Wallbox IP Address has changed, from" << existingThing->paramValue(wallboxThingIpAddressParamTypeId).toString() << "to" << networkDevice.address().toString(); existingThing->setParamValue(wallboxThingIpAddressParamTypeId, networkDevice.address().toString()); + KeContact *keba = m_kebaDevices.value(existingThing->id()); + if (keba) { + keba->setAddress(QHostAddress(networkDevice.address())); + } else { + qCWarning(dcKebaKeContact()) << "Could not update IP address, for" << existingThing; + } } else { qCDebug(dcKebaKeContact()) << "Keba Wallbox" << existingThing->name() << "IP address has not changed" << networkDevice.address().toString(); }