diff --git a/netatmo/devicepluginnetatmo.cpp b/netatmo/devicepluginnetatmo.cpp index 1dc9d32c..9300a70f 100644 --- a/netatmo/devicepluginnetatmo.cpp +++ b/netatmo/devicepluginnetatmo.cpp @@ -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) diff --git a/netatmo/devicepluginnetatmo.json b/netatmo/devicepluginnetatmo.json index f552bcf6..dc8177f2 100644 --- a/netatmo/devicepluginnetatmo.json +++ b/netatmo/devicepluginnetatmo.json @@ -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 }, { diff --git a/netatmo/netatmobasestation.h b/netatmo/netatmobasestation.h index 6c970bdc..2c050406 100644 --- a/netatmo/netatmobasestation.h +++ b/netatmo/netatmobasestation.h @@ -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;