Netatmo: fix after upstream API change, make use of new interfaces
This commit is contained in:
parent
1573639d0f
commit
d4b7d78a96
@ -137,7 +137,7 @@ void DevicePluginNetatmo::refreshData(Device *device, const QString &token)
|
||||
QUrlQuery query;
|
||||
query.addQueryItem("access_token", token);
|
||||
|
||||
QUrl url("https://api.netatmo.com/api/devicelist");
|
||||
QUrl url("https://api.netatmo.com/api/getstationsdata");
|
||||
url.setQuery(query);
|
||||
|
||||
QNetworkReply *reply = hardwareManager()->networkManager()->get(QNetworkRequest(url));
|
||||
@ -214,7 +214,7 @@ Device *DevicePluginNetatmo::findIndoorDevice(const QString &macAddress)
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Device *DevicePluginNetatmo::findOutdoorDevice(const QString &macAddress)
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
"Weather",
|
||||
"Sensor"
|
||||
],
|
||||
"interfaces": ["temperaturesensor", "humiditysensor", "pressuresensor"],
|
||||
"interfaces": ["temperaturesensor", "humiditysensor", "pressuresensor", "noisesensor", "co2sensor"],
|
||||
"primaryStateTypeId": "3cb25538-e463-40ae-92f9-8f34f0c06b92",
|
||||
"createMethods": ["auto"],
|
||||
"paramTypes": [
|
||||
@ -147,7 +147,7 @@
|
||||
"displayNameEvent": "noise changed",
|
||||
"graphRelevant": true,
|
||||
"unit": "Dezibel",
|
||||
"type": "int",
|
||||
"type": "double",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
@ -157,7 +157,7 @@
|
||||
"displayNameEvent": "co2 changed",
|
||||
"graphRelevant": true,
|
||||
"unit": "PartsPerMillion",
|
||||
"type": "int",
|
||||
"type": "double",
|
||||
"defaultValue": 0
|
||||
},
|
||||
{
|
||||
|
||||
@ -30,7 +30,7 @@ class NetatmoBaseStation : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit NetatmoBaseStation(const QString &name, const QString &macAddress, QObject *parent = 0);
|
||||
explicit NetatmoBaseStation(const QString &name, const QString &macAddress, QObject *parent = nullptr);
|
||||
|
||||
// Params
|
||||
QString name() const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user