From 53f59049a489520f05b8335f3044533417987a77 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 22 May 2023 22:04:19 +0200 Subject: [PATCH] Shelly: Mark devices offline on any polling network error --- shelly/integrationpluginshelly.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shelly/integrationpluginshelly.cpp b/shelly/integrationpluginshelly.cpp index 3d7873ef..3302d975 100644 --- a/shelly/integrationpluginshelly.cpp +++ b/shelly/integrationpluginshelly.cpp @@ -1305,7 +1305,7 @@ void IntegrationPluginShelly::fetchStatusGen1(Thing *thing) connect(reply, &QNetworkReply::finished, thing, [this, thing, reply](){ if (reply->error() != QNetworkReply::NoError) { qCWarning(dcShelly()) << "Unable to update status for" << thing->name() << reply->error() << reply->errorString(); - if (reply->error() == QNetworkReply::HostNotFoundError && !thing->hasState("batteryLevel")) { + if (!thing->hasState("batteryLevel")) { thing->setStateValue("connected", false); foreach (Thing *child, myThings().filterByParentId(thing->id())) { child->setStateValue("connected", false);