iobroker.innogy-smarthome
Advanced tools
Comparing version 0.0.3 to 0.0.4
33
main.js
@@ -67,5 +67,9 @@ /* jshint -W097 */// jshint strict:false | ||
return ((room ? room + "." : "") + deviceName).replaceAll(" ", "-").replaceAll("---", "-").replaceAll("--", "-"); | ||
return cleanDeviceName((room ? room + "." : "") + deviceName); | ||
} | ||
function cleanDeviceName(aString) { | ||
return aString.replaceAll(" ", "-").replaceAll("---", "-").replaceAll("--", "-") | ||
} | ||
function initSmartHome() { | ||
@@ -94,3 +98,3 @@ adapter.subscribeStates('*'); | ||
aCapability.State.forEach(function (aState) { | ||
var capabilityPath = devicePath + "." + aState.name; | ||
var capabilityPath = devicePath + "." + cleanDeviceName(aState.name); | ||
adapter.setState(capabilityPath, {val: aState.value, ack: true}); | ||
@@ -149,3 +153,3 @@ }); | ||
var capabilityPath = devicePath + "." + aState.name; | ||
var capabilityPath = devicePath + "." + cleanDeviceName(aState.name); | ||
@@ -233,2 +237,3 @@ adapter.setObjectNotExists(capabilityPath, { | ||
case "/types/HumidityLevel": | ||
case "/types/product/WeatherStation.Netatmo/2.0/HumidityLevel": | ||
res.type = "number"; | ||
@@ -250,2 +255,3 @@ res.role = "sensor.humidity"; | ||
case "/types/ActualTemperature": | ||
case "/types/product/WeatherStation.Netatmo/2.0/ActualTemperature": | ||
res.type = "number"; | ||
@@ -257,2 +263,23 @@ res.role = "sensor.temperature"; | ||
break; | ||
case "/types/product/WeatherStation.Netatmo/2.0/CarbonDioxideLevel": | ||
res.type = "number"; | ||
res.role = "sensor.co2"; | ||
res.read = true; | ||
res.write = false; | ||
res.unit = "ppm"; | ||
break; | ||
case "/types/product/WeatherStation.Netatmo/2.0/NoiseLevel": | ||
res.type = "number"; | ||
res.role = "sensor.noise"; | ||
res.read = true; | ||
res.write = false; | ||
res.unit = "dB"; | ||
break; | ||
case "/types/product/WeatherStation.Netatmo/2.0/RainfallAmount": | ||
res.type = "number"; | ||
res.role = "sensor.rain"; | ||
res.read = true; | ||
res.write = false; | ||
res.unit = "mm"; | ||
break; | ||
case "/types/device/RST.RWE/1.1/OperationMode": | ||
@@ -259,0 +286,0 @@ res.type = "string"; |
{ | ||
"name": "iobroker.innogy-smarthome", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "ioBroker Innogy SmartHome Adapter", | ||
@@ -28,3 +28,3 @@ "author": { | ||
"dependencies": { | ||
"innogy-smarthome-lib": "^0.1.4" | ||
"innogy-smarthome-lib": "^0.1.5" | ||
}, | ||
@@ -31,0 +31,0 @@ "devDependencies": { |
@@ -13,2 +13,5 @@ ![Logo](admin/innogy-smarthome.png) | ||
### 0.0.4 | ||
Added Netatmo Weatherstation | ||
### 0.0.3 | ||
@@ -15,0 +18,0 @@ Added a lot of devices |
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
33850
321
30
Updatedinnogy-smarthome-lib@^0.1.5