Merge PR #697: Shelly: Mark devices offline on any polling network error

master
jenkins 2023-06-07 15:51:26 +02:00
commit af65167f08
1 changed files with 1 additions and 1 deletions

View File

@ -1169,7 +1169,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);