iobroker.netatmo
Advanced tools
Comparing version 0.0.4 to 0.1.0
{ | ||
"common": { | ||
"name": "netatmo", | ||
"version": "0.0.4", | ||
"version": "0.1.0", | ||
"title": "Netatmo Adapter", | ||
@@ -6,0 +6,0 @@ "desc": { |
97
main.js
@@ -180,2 +180,36 @@ /* jshint -W097 */// jshint strict:false | ||
} | ||
if (aModule.last_status_store) { | ||
var theDate = new Date(aModule.last_status_store * 1000); | ||
adapter.setObjectNotExists(aParent + ".LastUpdate", { | ||
type: "state", | ||
common: { | ||
name: "Last update", | ||
type: "datetime", | ||
role: "indicator.date", | ||
read: true, | ||
write: false | ||
} | ||
}); | ||
adapter.setState(aParent + ".LastUpdate", {val: theDate, ack: true}); | ||
} | ||
if (aModule.last_seen) { | ||
var theDate = new Date(aModule.last_seen * 1000); | ||
adapter.setObjectNotExists(aParent + ".LastUpdate", { | ||
type: "state", | ||
common: { | ||
name: "Last update", | ||
type: "datetime", | ||
role: "indicator.date", | ||
read: true, | ||
write: false | ||
} | ||
}); | ||
adapter.setState(aParent + ".LastUpdate", {val: theDate, ack: true}); | ||
} | ||
} | ||
@@ -203,2 +237,63 @@ | ||
adapter.setState(aParent + ".Temperature", {val: aModule.dashboard_data.Temperature, ack: true}); | ||
adapter.setObjectNotExists(aParent + ".TemperatureAbsoluteMin", { | ||
type: "state", | ||
common: { | ||
name: "Absolute temperature minimum", | ||
type: "number", | ||
role: "indicator.temperature", | ||
read: true, | ||
write: false, | ||
unit: "°C" | ||
} | ||
}); | ||
adapter.setObjectNotExists(aParent + ".TemperatureAbsoluteMax", { | ||
type: "state", | ||
common: { | ||
name: "Absolute temperature maximum", | ||
type: "number", | ||
role: "indicator.temperature", | ||
read: true, | ||
write: false, | ||
unit: "°C" | ||
} | ||
}); | ||
adapter.setObjectNotExists(aParent + ".TemperatureAbsoluteMinDate", { | ||
type: "state", | ||
common: { | ||
name: "Absolute temperature maximum date", | ||
type: "string", | ||
role: "indicator.datetime", | ||
read: true, | ||
write: false, | ||
} | ||
}); | ||
adapter.setObjectNotExists(aParent + ".TemperatureAbsoluteMaxDate", { | ||
type: "state", | ||
common: { | ||
name: "Absolute temperature maximum date", | ||
type: "string", | ||
role: "indicator.datetime", | ||
read: true, | ||
write: false, | ||
} | ||
}); | ||
adapter.getState(aParent + ".TemperatureAbsoluteMin", function(state) { | ||
if (!state || state.val < aModule.dashboard_data.Temperature) { | ||
adapter.setState(aParent + ".TemperatureAbsoluteMin", {val: aModule.dashboard_data.Temperature, ack: true}); | ||
adapter.setState(aParent + ".TemperatureAbsoluteMinDate", {val: new Date(), ack: true}); | ||
} | ||
}); | ||
adapter.getState(aParent + ".TemperatureAbsoluteMax", function(state) { | ||
if (!state || state.val > aModule.dashboard_data.Temperature) { | ||
adapter.setState(aParent + ".TemperatureAbsoluteMax", {val: aModule.dashboard_data.Temperature, ack: true}); | ||
adapter.setState(aParent + ".TemperatureAbsoluteMaxDate", {val: new Date(), ack: true}); | ||
} | ||
}); | ||
} | ||
@@ -313,3 +408,3 @@ | ||
if (typeof aModule.dashboard_data.co2_calibrating !== "undefined") { | ||
if (typeof aModule.co2_calibrating !== "undefined") { | ||
adapter.setObjectNotExists(aParent + ".Calibrating", { | ||
@@ -316,0 +411,0 @@ type: "state", |
{ | ||
"name": "iobroker.netatmo", | ||
"version": "0.0.4", | ||
"version": "0.1.0", | ||
"description": "ioBroker netatmo Adapter", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -9,4 +9,10 @@ ![Logo](admin/netatmo.png) | ||
#### 0.1.0 | ||
* Fixed CO2 calibrating status | ||
* Added last update for devices | ||
* Added TemperatureAbsoluteMin/TemperatureAbsoluteMax to get overall temperature min/max since adapter installation | ||
#### 0.0.4 | ||
* Fixed typo/missing parameter in GustStrength | ||
#### 0.0.3 | ||
@@ -13,0 +19,0 @@ * Added error handling to prevent exceptions for missing parameters |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65070
866
29