improved discovery error repsonse
This commit is contained in:
parent
fced2b9fe9
commit
f7eef285dd
@ -248,7 +248,12 @@ void IntegrationPluginAqi::onPluginTimer()
|
||||
|
||||
void IntegrationPluginAqi::onRequestExecuted(QUuid requestId, bool success)
|
||||
{
|
||||
qCDebug(dcAirQualityIndex()) << "Request executd, requestId:" << requestId << "Success:" << success << "is an async request:" << m_asyncRequests.contains(requestId);
|
||||
qCDebug(dcAirQualityIndex()) << "Request executed, requestId:" << requestId << "Success:" << success << "is an async request:" << m_asyncRequests.contains(requestId);
|
||||
if (m_asyncDiscovery.contains(requestId) && !success) {
|
||||
ThingDiscoveryInfo *info = m_asyncDiscovery.take(requestId);
|
||||
info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("Air quality index server not available, please check your internet connection."));
|
||||
}
|
||||
|
||||
if (m_asyncRequests.contains(requestId)) {
|
||||
|
||||
Thing *thing = myThings().findById(m_asyncRequests.value(requestId));
|
||||
|
||||
@ -272,5 +272,10 @@ The name of the StateType ({c4366608-2511-428b-964e-2ad9e37f8f3c}) of ThingClass
|
||||
<source>Everyone should avoid all outdoor exertion</source>
|
||||
<translation>Jeder sollte jede Anstrengung im Freien vermeiden.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../integrationpluginaqi.cpp" line="254"/>
|
||||
<source>Air quality index server not available, please check your internet connection.</source>
|
||||
<translation>Air quality index Server nicht verfügbar, bitte überprüfe die Internetverbindung.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@ -272,5 +272,10 @@ The name of the StateType ({c4366608-2511-428b-964e-2ad9e37f8f3c}) of ThingClass
|
||||
<source>Everyone should avoid all outdoor exertion</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../integrationpluginaqi.cpp" line="254"/>
|
||||
<source>Air quality index server not available, please check your internet connection.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user