changes requested by reviewer
This commit is contained in:
parent
d0b85fe7de
commit
1ba818c69f
@ -34,7 +34,7 @@ inform you what precautions should be taken.
|
||||
|
||||
* Valid "Air Quality Index" API Key
|
||||
* The package "nymea-plugin-airqualityindex" must be installed
|
||||
* Intenet connection
|
||||
* Internet connection
|
||||
|
||||
## More
|
||||
|
||||
|
||||
@ -88,6 +88,7 @@ void IntegrationPluginAqi::discoverThings(ThingDiscoveryInfo *info)
|
||||
}
|
||||
QUuid requestId = m_aqiConnection->getDataByIp();
|
||||
m_asyncDiscovery.insert(requestId, info);
|
||||
connect(info, &ThingDiscoveryInfo::aborted, [=] {m_asyncDiscovery.remove(requestId);});
|
||||
}
|
||||
|
||||
void IntegrationPluginAqi::setupThing(ThingSetupInfo *info)
|
||||
@ -123,8 +124,6 @@ void IntegrationPluginAqi::setupThing(ThingSetupInfo *info)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void IntegrationPluginAqi::postSetupThing(Thing *thing)
|
||||
{
|
||||
if (thing->thingClassId() == airQualityIndexThingClassId) {
|
||||
@ -144,13 +143,9 @@ void IntegrationPluginAqi::postSetupThing(Thing *thing)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IntegrationPluginAqi::thingRemoved(Thing *thing)
|
||||
{
|
||||
if (thing->thingClassId() == airQualityIndexThingClassId) {
|
||||
|
||||
}
|
||||
|
||||
Q_UNUSED(thing)
|
||||
if (myThings().empty()) {
|
||||
if (!m_pluginTimer) {
|
||||
hardwareManager()->pluginTimerManager()->unregisterTimer(m_pluginTimer);
|
||||
@ -163,7 +158,6 @@ void IntegrationPluginAqi::thingRemoved(Thing *thing)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void IntegrationPluginAqi::onAirQualityDataReceived(QUuid requestId, AirQualityIndex::AirQualityData data)
|
||||
{
|
||||
if (m_asyncSetups.contains(requestId)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user