fixed edit openweathermap
This commit is contained in:
parent
516e825067
commit
cc0bd99d69
@ -95,12 +95,12 @@ DeviceManager::DeviceSetupStatus DevicePluginOpenweathermap::setupDevice(Device
|
|||||||
return DeviceManager::DeviceSetupStatusFailure;
|
return DeviceManager::DeviceSetupStatusFailure;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Device *deviceListDevice, deviceManager()->findConfiguredDevices(openweathermapDeviceClassId)) {
|
// foreach (Device *d, myDevices()) {
|
||||||
if(deviceListDevice->paramValue("id").toString() == device->paramValue("id").toString()){
|
// if(d->paramValue("id").toString() == device->paramValue("id").toString()){
|
||||||
qWarning() << QString("Location " + device->paramValue("location").toString() + "already in added");
|
// qWarning() << QString("ERROR: Location " + d->paramValue("location").toString() + " with id " + d->paramValue("id").toString() + ") " + " already added: ");
|
||||||
return DeviceManager::DeviceSetupStatusFailure;
|
// return DeviceManager::DeviceSetupStatusFailure;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
device->setName("Weather from OpenWeatherMap (" + device->paramValue("location").toString() + ")");
|
device->setName("Weather from OpenWeatherMap (" + device->paramValue("location").toString() + ")");
|
||||||
update(device);
|
update(device);
|
||||||
|
|||||||
Reference in New Issue
Block a user