iobroker.weathersense 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/io-package.json +14 -1
- package/main.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "weathersense",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.0.2": {
|
|
7
|
+
"en": "Unit hPa added",
|
|
8
|
+
"de": "Einheit hPa hinzugefügt",
|
|
9
|
+
"ru": "Единица hPa добавлена",
|
|
10
|
+
"pt": "Unidade hPa adicionada",
|
|
11
|
+
"nl": "Eenheid hPa toegevoegd",
|
|
12
|
+
"fr": "Unité hPa ajoutée",
|
|
13
|
+
"it": "Ulteriori informazioni",
|
|
14
|
+
"es": "Unidad de resultados",
|
|
15
|
+
"pl": "Jednostka hPa dodana",
|
|
16
|
+
"uk": "Блок hPa додано",
|
|
17
|
+
"zh-cn": "单位 hPa 添加"
|
|
18
|
+
},
|
|
6
19
|
"2.0.1": {
|
|
7
20
|
"en": "More data output\nCleaner type & channel output",
|
|
8
21
|
"de": "Mehr Datenausgabe\nReiniger Typ & Kanal Ausgang",
|
package/main.js
CHANGED
|
@@ -159,13 +159,19 @@ class WeatherSense extends utils.Adapter {
|
|
|
159
159
|
for (const [key, value] of Object.entries(content)) {
|
|
160
160
|
if (value !== null && value !== undefined && key !== 'sensorDatas') {
|
|
161
161
|
const id = `${devDataChannelId}.${key}`;
|
|
162
|
+
|
|
163
|
+
let unit = '';
|
|
164
|
+
if (key === 'atmos') {
|
|
165
|
+
unit = 'hPa';
|
|
166
|
+
}
|
|
167
|
+
|
|
162
168
|
await this.setObjectNotExistsAsync(id, {
|
|
163
169
|
type: typeof value === 'number' ? 'state' : 'state',
|
|
164
170
|
common: {
|
|
165
171
|
name: key,
|
|
166
172
|
type: typeof value,
|
|
167
173
|
role: 'value',
|
|
168
|
-
unit:
|
|
174
|
+
unit: unit,
|
|
169
175
|
read: true,
|
|
170
176
|
write: false,
|
|
171
177
|
},
|