From 2c9ba6e4ae8ed942b0b650442134c60c992d0ba2 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Tue, 29 Jun 2021 13:53:08 +0200 Subject: [PATCH 01/35] prevent warning if there are no cards at all. --- lib/server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/server.js b/lib/server.js index f98f77f24..1ca0f7479 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1106,7 +1106,9 @@ class WebServer { }); } } catch (err) { - this.log.warn('Could not load custom cards: ' + err); + if (err.message !== 'Not exists') { //prevent error if there are no cards at all. + this.log.warn('Could not load custom cards: ' + err); + } } } From 351ca5767603a13381db5a85ef03cbb4da64363b Mon Sep 17 00:00:00 2001 From: Garfonso Date: Tue, 29 Jun 2021 16:19:24 +0200 Subject: [PATCH 02/35] fix typo in zigbee workaround. --- lib/converters/light.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/converters/light.js b/lib/converters/light.js index 109cb9e6c..ea7c1070c 100644 --- a/lib/converters/light.js +++ b/lib/converters/light.js @@ -67,7 +67,7 @@ function _lightAdvancedAddState(states, objects, entity) { const getState = states.stateRead; //prevent zigbee 'available' to become getId: if (getState && getState.indexOf('zigbee.') === 0 && getState.indexOf('.available') > 0) { - entity.context.STATE.getId = states.states; + entity.context.STATE.getId = states.state; } if (states.state) { entity.context.STATE.isBoolean = objects[states.state] && objects[states.state].common && objects[states.state].common.type === 'boolean'; From 00c0bf5ea64e00951fdcef3ecd5f020e64246e1e Mon Sep 17 00:00:00 2001 From: Garfonso Date: Tue, 29 Jun 2021 17:32:45 +0200 Subject: [PATCH 03/35] add zigbee light test --- .../light_integration_tests.js | 49 ++++ test/testData/light_zigbee_color.json | 219 ++++++++++++++++++ 2 files changed, 268 insertions(+) create mode 100644 test/testData/light_zigbee_color.json diff --git a/test/integrationTests/light_integration_tests.js b/test/integrationTests/light_integration_tests.js index f4ebccdb4..1c21c75b1 100644 --- a/test/integrationTests/light_integration_tests.js +++ b/test/integrationTests/light_integration_tests.js @@ -569,4 +569,53 @@ exports.runTests = function (getHarness) { }, deviceId, state => expect(state.val).to.equal(false)); expect(entity).to.have.nested.property('attributes.color_mode', 'onoff'); }); + + it('zigbee rgbSingle should be controllable', async () => { + const harness = getHarness(); + const objects = JSON.parse(JSON.stringify(require('../testData/light_zigbee_color.json'))); + const deviceId = 'zigbee.0.zigbeeColor'; + const entities = await tools.startAndGetEntities(harness, objects, [deviceId], [{id: deviceId + '.state', val: true}, {id: deviceId + '.color', val: '#FF0080'}]); + const entity = entities.find(e => e.context.id === deviceId); + expect(entity).to.be.ok; + tools.expectEntity(entity, 'light', deviceId); + const ctAttr = entity.context.ATTRIBUTES.find(a => a.attribute === 'rgb_color'); + expect(ctAttr).to.be.ok; + + expect(entity).to.have.property('state', 'on'); //this fails if workaround ot ignore zigbee.xyz.available test is missing. + expect(entity).to.have.nested.property('attributes.rgb_color'); + expect(entity.attributes.rgb_color).to.have.members([255, 0, 128]); + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId + '.color', '00FF00', true), //expect to work with # and without. + entity => { + expect(entity.attributes.rgb_color).to.have.members([0, 255, 0]); + }); + //test HSV edge cases: + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId + '.color', '#000000', true), + entity => { + expect(entity.attributes.rgb_color).to.have.members([0, 0, 0]); + }); + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId + '.color', '#FFFFFF', true), + entity => { + expect(entity.attributes.rgb_color).to.have.members([255, 255, 255]); + }); + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId + '.color', '#FFFF80', true), + entity => { + expect(entity.attributes.rgb_color).to.have.members([255, 255, 128]); + }); + expect(entity).to.have.nested.property('attributes.color_mode', 'rgb'); + + await tools.validateUIInput(harness, entity,m => { + m.domain = 'light'; m.service = 'turn_on'; m.service_data = { rgb_color: [0, 255, 0] }; + }, deviceId + '.color', state => expect(state.val).to.equal('#00FF00')); + await tools.validateUIInput(harness, entity,m => { + m.domain = 'light'; m.service = 'turn_on'; m.service_data = { rgb_color: [255, 128, 128] }; + }, deviceId + '.color', state => expect(state.val).to.equal('#FF8080')); + await tools.validateUIInput(harness, entity,m => { + m.domain = 'light'; m.service = 'turn_on'; m.service_data = { rgb_color: [255, 255, 255] }; + }, deviceId + '.color', state => expect(state.val).to.equal('#FFFFFF')); + expect(entity).to.have.nested.property('attributes.color_mode', 'rgb'); + }); }; diff --git a/test/testData/light_zigbee_color.json b/test/testData/light_zigbee_color.json new file mode 100644 index 000000000..d2e8351bc --- /dev/null +++ b/test/testData/light_zigbee_color.json @@ -0,0 +1,219 @@ +{ + "zigbee.0.zigbeeColor": { + "type": "device", + "common": { + "name": "Zigbee Color", + "type": "LED1624G9", + "icon": "img/ikea_e14_bulb.png" + }, + "native": { + "id": "zigbeeColor" + }, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1624840690574, + "_id": "zigbee.0.zigbeeColor", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "zigbee.0.zigbeeColor.available": { + "type": "state", + "common": { + "name": "Available", + "type": "boolean", + "read": true, + "write": false, + "role": "state" + }, + "native": {}, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1605542604598, + "_id": "zigbee.0.zigbeeColor.available", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "zigbee.0.zigbeeColor.brightness": { + "type": "state", + "common": { + "name": "Brightness", + "type": "number", + "unit": "", + "read": true, + "write": true, + "role": "level.dimmer", + "min": 0, + "max": 100 + }, + "native": {}, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1605542604599, + "_id": "zigbee.0.zigbeeColor.brightness", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "zigbee.0.zigbeeColor.brightness_move": { + "type": "state", + "common": { + "name": "Dimming", + "type": "number", + "read": false, + "write": true, + "role": "state", + "min": -50, + "max": 50 + }, + "native": {}, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1618922883523, + "_id": "zigbee.0.zigbeeColor.brightness_move", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "zigbee.0.zigbeeColor.color": { + "type": "state", + "common": { + "name": "Color", + "type": "string", + "read": true, + "write": true, + "role": "level.color.rgb" + }, + "native": {}, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1605542604602, + "_id": "zigbee.0.zigbeeColor.color", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "zigbee.0.zigbeeColor.device_query": { + "type": "state", + "common": { + "name": "Trigger device query", + "type": "boolean", + "read": false, + "write": true, + "role": "button" + }, + "native": {}, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1613405434530, + "_id": "zigbee.0.zigbeeColor.device_query", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "zigbee.0.zigbeeColor.groups": { + "type": "state", + "common": { + "name": "Groups", + "type": "string", + "read": true, + "write": false, + "role": "state" + }, + "native": {}, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1605542604603, + "_id": "zigbee.0.zigbeeColor.groups", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "zigbee.0.zigbeeColor.link_quality": { + "type": "state", + "common": { + "name": "Link quality", + "type": "number", + "read": true, + "write": false, + "role": "state", + "min": 0, + "max": 254 + }, + "native": {}, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1605542604596, + "_id": "zigbee.0.zigbeeColor.link_quality", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "zigbee.0.zigbeeColor.state": { + "type": "state", + "common": { + "name": "Switch state", + "type": "boolean", + "read": true, + "write": true, + "role": "switch" + }, + "native": {}, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1605542604599, + "_id": "zigbee.0.zigbeeColor.state", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "zigbee.0.zigbeeColor.transition_time": { + "type": "state", + "common": { + "name": "Transition time", + "type": "number", + "unit": "sec", + "read": false, + "write": true, + "role": "state" + }, + "native": {}, + "from": "system.adapter.zigbee.0", + "user": "system.user.admin", + "ts": 1605542604603, + "_id": "zigbee.0.zigbeeColor.transition_time", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + } +} From f4f89c881ddb24db3d905dc7ee5563a93f9325b9 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Tue, 29 Jun 2021 17:34:52 +0200 Subject: [PATCH 04/35] Update README.md fixed issue #222 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b64bc0294..df323c89d 100644 --- a/README.md +++ b/README.md @@ -468,6 +468,9 @@ After that checkout modified version in `./build` folder. Then. PLACEHOLDER for next version: ### **WORK IN PROGRESS** --> +### **WORK IN PROGRESS** +* (Garfonso) fixed: Zigbee lights (issue 222). + ### 2.0.0 (2021-06-17) * (Garfonso) Changed: !Breaking! Battery warning is now binary_sensor instead of sensor (now ui sets icon and translates ok) * (Garfonso) Fixed: !Breaking! entity_id conflict for low_bat / humidity when part of another device From 94b3f9ea4dfa87e559059eeb0a2723c3342cfacb Mon Sep 17 00:00:00 2001 From: Garfonso Date: Wed, 30 Jun 2021 14:32:53 +0200 Subject: [PATCH 05/35] add support for fireAlarm -> smoke detector --- lib/converters/binary_sensor.js | 18 ++++++++++++++++++ lib/server.js | 1 + 2 files changed, 19 insertions(+) diff --git a/lib/converters/binary_sensor.js b/lib/converters/binary_sensor.js index d707abde5..ee17539ba 100644 --- a/lib/converters/binary_sensor.js +++ b/lib/converters/binary_sensor.js @@ -1,5 +1,17 @@ const utils = require('./utils'); +function createSensorEntity(control, name, room, func, _obj, forcedEntityId, stateName = 'ACTUAL') { + const entity = utils.processCommon(name, room, func, _obj, 'binary_sensor', forcedEntityId); + + entity.context.STATE = {getId: null}; + const state = control.states.find(s => s.id && s.name === stateName); + if (state && state.id) { + entity.context.STATE.getId = state.id; + utils.addID2entity(state.id, entity); + } + return entity; +} + exports.processMotion = function (id, control, name, room, func, _obj, objects, forcedEntityId) { const entity = utils.processCommon(name, room, func, _obj, 'binary_sensor', forcedEntityId); @@ -59,6 +71,12 @@ exports.processBattery = function (control, name, room, func, objects, forcedEnt } }; +exports.processFireAlarm = function (id, control, name, room, func, _obj, objects, forcedEntityId) { + const entity = createSensorEntity(control, name, room, func, _obj, forcedEntityId); + entity.attributes.device_class = 'smoke'; + return [entity]; +}; + /** * Create manual binary_sensor entity. * @param id - id of "main" object, i.e. state. diff --git a/lib/server.js b/lib/server.js index 1ca0f7479..ff69b01ac 100644 --- a/lib/server.js +++ b/lib/server.js @@ -172,6 +172,7 @@ class WebServer { [Types.location_one]: processLocation, [Types.media]: processMediaPlayer, [Types.image]: processImage, + [Types.fireAlarm]: converterBinarySensors.processFireAlarm }; const concurrentPromises = [ From 1df4bfd23608b4a426b8a5edd0a7272314278855 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 1 Jul 2021 10:14:55 +0200 Subject: [PATCH 06/35] Update test-and-release.yml fix #232 --- .github/workflows/test-and-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 1b7602f75..09b684fb6 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -87,7 +87,6 @@ jobs: if: | contains(github.event.head_commit.message, '[skip ci]') == false && github.event_name == 'push' && - github.event.base_ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest strategy: From adc48ec0bf31ffe3ecbf2dbf33fc9353e936a32d Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 1 Jul 2021 10:15:05 +0200 Subject: [PATCH 07/35] update dependencies --- package-lock.json | 56 +++++++++++++++++++++++------------------------ package.json | 12 +++++----- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 24102bb53..df2457db3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -383,9 +383,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", - "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", + "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", "dev": true }, "@babel/helper-validator-option": { @@ -404,12 +404,12 @@ } }, "@babel/highlight": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", - "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.0", + "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -1227,9 +1227,9 @@ "dev": true }, "@types/chai": { - "version": "4.2.18", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.18.tgz", - "integrity": "sha512-rS27+EkB/RE1Iz3u0XtVL5q36MGDWbgYe7zWiodyKNUnthxY0rukK5V36eiUCtCisB7NN8zKYH6DO2M37qxFEQ==", + "version": "4.2.19", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.19.tgz", + "integrity": "sha512-jRJgpRBuY+7izT7/WNXP/LsMO9YonsstuL+xuvycDyESpoDoIAsMd7suwpB4h9oEWB+ZlPTqJJ8EHomzNhwTPQ==", "dev": true }, "@types/chai-as-promised": { @@ -1400,9 +1400,9 @@ "dev": true }, "@types/node": { - "version": "15.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz", - "integrity": "sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==" + "version": "15.12.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.5.tgz", + "integrity": "sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg==" }, "@types/proxyquire": { "version": "1.3.28", @@ -2861,9 +2861,9 @@ "dev": true }, "eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.29.0.tgz", + "integrity": "sha512-82G/JToB9qIy/ArBzIWG9xvvwL3R86AlCjtGw+A29OMZDqhTybz/MByORSukGxeI+YPCR4coYyITKk8BFH9nDA==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", @@ -4560,9 +4560,9 @@ "dev": true }, "iobroker.type-detector": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/iobroker.type-detector/-/iobroker.type-detector-1.0.12.tgz", - "integrity": "sha512-j7GB950zyga3X75F4yJ0G/3FxsF93W1vTUXP5WLUpR+0n/r4AsVABdttKZLJaGAXwIkfvY5aG096qy+fJKRUpw==" + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/iobroker.type-detector/-/iobroker.type-detector-1.0.14.tgz", + "integrity": "sha512-RCfAeuHGx0zAf7LlRiDGWIyE2p6eEqisrkkcaV+zk47ScxH8QtV1X1yHUi33L62gcU3MNkmxMswGD29HHdDsnQ==" }, "ipaddr.js": { "version": "1.9.1", @@ -5340,9 +5340,9 @@ } }, "mocha": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.0.0.tgz", - "integrity": "sha512-GRGG/q9bIaUkHJB9NL+KZNjDhMBHB30zW3bZW9qOiYr+QChyLjPzswaxFWkI1q6lGlSL28EQYzAi2vKWNkPx+g==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.0.1.tgz", + "integrity": "sha512-9zwsavlRO+5csZu6iRtl3GHImAbhERoDsZwdRkdJ/bE+eVplmoxNKE901ZJ9LdSchYBjSCPbjKc5XvcAri2ylw==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", @@ -6649,9 +6649,9 @@ } }, "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "release-zalgo": { @@ -7903,9 +7903,9 @@ } }, "ws": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.0.tgz", - "integrity": "sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw==" + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz", + "integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow==" }, "xtend": { "version": "4.0.2", diff --git a/package.json b/package.json index bc6bd502e..19329d764 100644 --- a/package.json +++ b/package.json @@ -23,31 +23,31 @@ "axios": "^0.21.1", "body-parser": "^1.19.0", "express": "^4.17.1", - "iobroker.type-detector": "^1.0.12", + "iobroker.type-detector": "^1.0.14", "js-yaml": "^4.1.0", "jstimezonedetect": "^1.0.7", "mime": "^2.5.2", "multer": "^1.4.2", "nyc": "^15.1.0", "pinyin": "^2.10.2", - "ws": "^7.5.0" + "ws": "^7.5.1" }, "devDependencies": { "@alcalzone/release-script": "^1.10.0", "@iobroker/testing": "^2.4.4", - "@types/chai": "^4.2.18", + "@types/chai": "^4.2.19", "@types/chai-as-promised": "^7.1.4", "@types/gulp": "^4.0.8", "@types/mocha": "^8.2.2", - "@types/node": "^15.12.2", + "@types/node": "^15.12.5", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.2", "@types/sinon-chai": "^3.2.5", "chai": "^4.3.4", "chai-as-promised": "^7.1.1", - "eslint": "^7.28.0", + "eslint": "^7.29.0", "gulp": "^4.0.2", - "mocha": "^9.0.0", + "mocha": "^9.0.1", "proxyquire": "^2.1.3", "sinon": "^10.0.0", "sinon-chai": "^3.7.0" From d81f2c204a7603c4342757a4dc69ea6f2d7546f4 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 1 Jul 2021 10:37:52 +0200 Subject: [PATCH 08/35] update dependencies 2 fixes #231 #230 #228 #227 #226 #225 #224 --- package-lock.json | 183 ++++++++++++++++++++++++++++++++++++++++------ package.json | 4 +- 2 files changed, 162 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index df2457db3..b13c5ddce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,22 +5,24 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-1.10.0.tgz", - "integrity": "sha512-rgPUulHpkyzPaynSN+tRYQsBiXa6OnWxyAidHUIofkF3r4eMju/n61BsVHp2CtXPst2uYITeKMy++q/g2TthuA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-2.1.0.tgz", + "integrity": "sha512-Y4Qihqp+ealxqfeN5NA91hRYndW2aywpT2AEKRVvecauKG7fMZ7BRz45gYLGImpS5ysVcRxTlIBc4VvdTpJtsQ==", "dev": true, "requires": { - "alcalzone-shared": "^3.0.3", + "alcalzone-shared": "^4.0.0", "axios": "^0.21.1", "colors": "^1.4.0", + "execa": "^5.1.1", + "fs-extra": "^10.0.0", "semver": "^7.3.5", - "yargs": "^16.2.0" + "yargs": "^17.0.1" }, "dependencies": { "alcalzone-shared": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-3.0.4.tgz", - "integrity": "sha512-QVnZWWRLVV0NGbR+AszgR3Y/BpPjGKgAyoiKuNegtYbLVTadbFbKLfYQd+4YYkB9PSaj+Qc5Z81U6UtQwzGeQA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-4.0.0.tgz", + "integrity": "sha512-UJ/8eEd4sZwjmMpV4PahmDS5U05UdqWPYJxT+a8xNOTqnNn4vgbuyFMNX1kSx2KKiwX3yJi5QkISS3kY7pXWfQ==", "dev": true, "requires": { "debug": "^4.3.1" @@ -52,6 +54,17 @@ "ms": "2.1.2" } }, + "fs-extra": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -111,9 +124,9 @@ } }, "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.0.1.tgz", + "integrity": "sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==", "dev": true, "requires": { "cliui": "^7.0.2", @@ -3075,6 +3088,23 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -4157,6 +4187,12 @@ "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==" }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -4493,6 +4529,12 @@ } } }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -5234,6 +5276,12 @@ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -5278,6 +5326,12 @@ "mime-db": "1.44.0" } }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -5813,6 +5867,15 @@ "once": "^1.3.2" } }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", @@ -6129,6 +6192,15 @@ "wrappy": "1" } }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -6927,17 +6999,76 @@ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, "sinon": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-10.0.0.tgz", - "integrity": "sha512-XAn5DxtGVJBlBWYrcYKEhWCz7FLwZGdyvANRyK06419hyEpdT0dMc5A8Vcxg5SCGHc40CsqoKsc1bt1CbJPfNw==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.1.tgz", + "integrity": "sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.8.1", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/samsam": "^5.3.1", - "diff": "^4.0.2", - "nise": "^4.1.0", - "supports-color": "^7.1.0" + "@sinonjs/commons": "^1.8.3", + "@sinonjs/fake-timers": "^7.1.0", + "@sinonjs/samsam": "^6.0.2", + "diff": "^5.0.0", + "nise": "^5.1.0", + "supports-color": "^7.2.0" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/samsam": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", + "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true + }, + "nise": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", + "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^7.0.4", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + } } }, "sinon-chai": { @@ -7252,6 +7383,12 @@ "is-utf8": "^0.2.0" } }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -7964,9 +8101,9 @@ } }, "yargs-parser": { - "version": "20.2.7", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", - "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, "yargs-unparser": { diff --git a/package.json b/package.json index 19329d764..57a0a1ad4 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "ws": "^7.5.1" }, "devDependencies": { - "@alcalzone/release-script": "^1.10.0", + "@alcalzone/release-script": "^2.1.0", "@iobroker/testing": "^2.4.4", "@types/chai": "^4.2.19", "@types/chai-as-promised": "^7.1.4", @@ -49,7 +49,7 @@ "gulp": "^4.0.2", "mocha": "^9.0.1", "proxyquire": "^2.1.3", - "sinon": "^10.0.0", + "sinon": "^11.1.1", "sinon-chai": "^3.7.0" }, "main": "main.js", From 4b200654e7a07767c21204a3d0e968d5844bf75a Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 1 Jul 2021 11:27:32 +0200 Subject: [PATCH 09/35] add test for firealarm with battery --- .../binary_sensor_integration_tests.js | 17 + .../light_integration_tests.js | 2 +- .../binary_sensor_fireAlarm_Homematic.json | 546 ++++++++++++++++++ test/testData/light_zigbee_color.json | 40 +- 4 files changed, 584 insertions(+), 21 deletions(-) create mode 100644 test/testData/binary_sensor_fireAlarm_Homematic.json diff --git a/test/integrationTests/binary_sensor_integration_tests.js b/test/integrationTests/binary_sensor_integration_tests.js index 04b88a757..3e4909cca 100644 --- a/test/integrationTests/binary_sensor_integration_tests.js +++ b/test/integrationTests/binary_sensor_integration_tests.js @@ -78,5 +78,22 @@ exports.runTests = function (getHarness) { it('detects Motion Sensor with battery and prevents id clash', async () => { await motion_sensor_with_id_clash(getHarness); }); + + it('detect fire alarm with battery', async () => { + const harness = getHarness(); + + const objects = require('../testData/binary_sensor_fireAlarm_Homematic.json'); + const deviceId = 'adapter.0.binary_sensor.firealarms.homematic'; + const alarmId = 'adapter.0.binary_sensor.firealarms.homematic.1.STATE'; + const batteryId = 'adapter.0.binary_sensor.firealarms.homematic.1.LOWBAT'; + const entities = await startAndGetEntities(harness, objects, deviceId); + const binarySensor = entities.find(e => e.context.id === deviceId); + const battery = entities.find(e => e.context.id === batteryId); + expect(binarySensor).to.be.ok; + expect(battery).to.be.ok; + expectBattery(battery, batteryId, objects[batteryId].common.name, batteryId); + expect(binarySensor).to.have.nested.property('attributes.device_class', 'smoke'); + expectBinarySensor(binarySensor, deviceId, objects[deviceId].common.name, alarmId); + }); }); }; diff --git a/test/integrationTests/light_integration_tests.js b/test/integrationTests/light_integration_tests.js index 1c21c75b1..26507ddb8 100644 --- a/test/integrationTests/light_integration_tests.js +++ b/test/integrationTests/light_integration_tests.js @@ -573,7 +573,7 @@ exports.runTests = function (getHarness) { it('zigbee rgbSingle should be controllable', async () => { const harness = getHarness(); const objects = JSON.parse(JSON.stringify(require('../testData/light_zigbee_color.json'))); - const deviceId = 'zigbee.0.zigbeeColor'; + const deviceId = 'adapter.0.light.zigbeeColor'; const entities = await tools.startAndGetEntities(harness, objects, [deviceId], [{id: deviceId + '.state', val: true}, {id: deviceId + '.color', val: '#FF0080'}]); const entity = entities.find(e => e.context.id === deviceId); expect(entity).to.be.ok; diff --git a/test/testData/binary_sensor_fireAlarm_Homematic.json b/test/testData/binary_sensor_fireAlarm_Homematic.json new file mode 100644 index 000000000..c5f45931f --- /dev/null +++ b/test/testData/binary_sensor_fireAlarm_Homematic.json @@ -0,0 +1,546 @@ +{ + "adapter.0.binary_sensor.firealarms.homematic": { + "_id": "adapter.0.binary_sensor.firealarms.homematic", + "type": "device", + "common": { + "name": "FireAlarm - HomeMatic" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1624785228951, + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.0": { + "_id": "adapter.0.binary_sensor.firealarms.homematic.0", + "type": "channel", + "common": { + "name": "FireAlarm - HomeMatic:0", + "role": "sensor.alarm.fire" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1624785228958, + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.0.AES_KEY": { + "type": "state", + "common": { + "def": 0, + "type": "number", + "read": true, + "write": false, + "min": 0, + "max": 127, + "role": "value", + "name": "FireAlarm - HomeMatic:0.AES_KEY" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785228971, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.AES_KEY", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.0.CONFIG_PENDING": { + "type": "state", + "common": { + "def": false, + "type": "boolean", + "read": true, + "write": false, + "role": "indicator", + "name": "FireAlarm - HomeMatic:0.CONFIG_PENDING" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785228985, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.CONFIG_PENDING", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.0.CONFIG_PENDING_ALARM": { + "type": "state", + "common": { + "name": "FireAlarm - HomeMatic:0.CONFIG_PENDING_ALARM", + "type": "number", + "role": "indicator.alarm", + "read": true, + "write": true, + "def": 0, + "states": { + "0": "NO ALARM", + "1": "ALARM", + "2": "ACKNOWLEDGED" + } + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1561648198547, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.CONFIG_PENDING_ALARM", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.0.DUTYCYCLE": { + "type": "state", + "common": { + "def": false, + "type": "boolean", + "read": true, + "write": false, + "role": "value", + "name": "FireAlarm - HomeMatic:0.DUTYCYCLE" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229007, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.DUTYCYCLE", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.0.DUTYCYCLE_ALARM": { + "type": "state", + "common": { + "name": "FireAlarm - HomeMatic:0.DUTYCYCLE_ALARM", + "type": "number", + "role": "indicator.alarm", + "read": true, + "write": true, + "def": 0, + "states": { + "0": "NO ALARM", + "1": "ALARM", + "2": "ACKNOWLEDGED" + } + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1561648198541, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.DUTYCYCLE_ALARM", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.0.LOWBAT": { + "type": "state", + "common": { + "def": false, + "type": "boolean", + "read": true, + "write": false, + "role": "indicator.lowbat", + "name": "FireAlarm - HomeMatic:0.LOWBAT" + }, + "native": {}, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.LOWBAT", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "from": "system.adapter.admin.0", + "user": "system.user.admin", + "ts": 1624960813369 + }, + "adapter.0.binary_sensor.firealarms.homematic.0.LOWBAT_ALARM": { + "type": "state", + "common": { + "name": "FireAlarm - HomeMatic:0.LOWBAT_ALARM", + "type": "number", + "role": "indicator.alarm", + "read": true, + "write": true, + "def": 0, + "states": { + "0": "NO ALARM", + "1": "ALARM", + "2": "ACKNOWLEDGED" + } + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1561648198533, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.LOWBAT_ALARM", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.0.RSSI_DEVICE": { + "type": "state", + "common": { + "def": 0, + "type": "number", + "read": true, + "write": false, + "min": -2147483648, + "max": 2147483647, + "role": "value.rssi", + "name": "FireAlarm - HomeMatic:0.RSSI_DEVICE", + "unit": "dBm" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229042, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.RSSI_DEVICE", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.0.RSSI_PEER": { + "type": "state", + "common": { + "def": 0, + "type": "number", + "read": true, + "write": false, + "min": -2147483648, + "max": 2147483647, + "role": "value.rssi", + "name": "FireAlarm - HomeMatic:0.RSSI_PEER", + "unit": "dBm" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229056, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.RSSI_PEER", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.0.STICKY_UNREACH": { + "type": "state", + "common": { + "def": false, + "type": "boolean", + "read": true, + "write": true, + "role": "indicator.unreach", + "name": "FireAlarm - HomeMatic:0.STICKY_UNREACH" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229074, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.STICKY_UNREACH", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.0.STICKY_UNREACH_ALARM": { + "type": "state", + "common": { + "name": "FireAlarm - HomeMatic:0.STICKY_UNREACH_ALARM", + "type": "number", + "role": "indicator.alarm", + "read": true, + "write": true, + "def": 0, + "states": { + "0": "NO ALARM", + "1": "ALARM", + "2": "ACKNOWLEDGED" + } + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1561648198526, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.STICKY_UNREACH_ALARM", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.0.UNREACH": { + "type": "state", + "common": { + "def": false, + "type": "boolean", + "read": true, + "write": false, + "role": "indicator.unreach", + "name": "FireAlarm - HomeMatic:0.UNREACH" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229086, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.UNREACH", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.0.UNREACH_ALARM": { + "type": "state", + "common": { + "name": "FireAlarm - HomeMatic:0.UNREACH_ALARM", + "type": "number", + "role": "indicator.alarm", + "read": true, + "write": true, + "def": 0, + "states": { + "0": "NO ALARM", + "1": "ALARM", + "2": "ACKNOWLEDGED" + } + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1561648198518, + "_id": "adapter.0.binary_sensor.firealarms.homematic.0.UNREACH_ALARM", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.1": { + "_id": "adapter.0.binary_sensor.firealarms.homematic.1", + "type": "channel", + "common": { + "name": "FireAlarm - HomeMatic", + "role": "sensor.alarm.fire" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1624785229100, + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.1.ERROR_ALARM_TEST": { + "type": "state", + "common": { + "def": 0, + "type": "number", + "read": true, + "write": false, + "min": 0, + "max": 1, + "states": { + "0": "NO_ERROR", + "1": "ALARM_TEST_FAILED" + }, + "name": "FireAlarm - HomeMatic.ERROR_ALARM_TEST" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229119, + "_id": "adapter.0.binary_sensor.firealarms.homematic.1.ERROR_ALARM_TEST", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.1.ERROR_ALARM_TEST-1_ALARM": { + "type": "state", + "common": { + "name": "FireAlarm - HomeMatic.ERROR_ALARM_TEST-1_ALARM", + "type": "number", + "role": "indicator.alarm", + "read": true, + "write": true, + "def": 0, + "states": { + "0": "NO ALARM", + "1": "ALARM", + "2": "ACKNOWLEDGED" + } + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1561648198467, + "_id": "adapter.0.binary_sensor.firealarms.homematic.1.ERROR_ALARM_TEST-1_ALARM", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.1.ERROR_SMOKE_CHAMBER": { + "type": "state", + "common": { + "def": 0, + "type": "number", + "read": true, + "write": false, + "min": 0, + "max": 1, + "states": { + "0": "NO_ERROR", + "1": "DEGRADED_SMOKE_CHAMBER" + }, + "name": "FireAlarm - HomeMatic.ERROR_SMOKE_CHAMBER" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229154, + "_id": "adapter.0.binary_sensor.firealarms.homematic.1.ERROR_SMOKE_CHAMBER", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.1.ERROR_SMOKE_CHAMBER-1_ALARM": { + "type": "state", + "common": { + "name": "FireAlarm - HomeMatic.ERROR_SMOKE_CHAMBER-1_ALARM", + "type": "number", + "role": "indicator.alarm", + "read": true, + "write": true, + "def": 0, + "states": { + "0": "NO ALARM", + "1": "ALARM", + "2": "ACKNOWLEDGED" + } + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "user": "system.user.admin", + "ts": 1561648198459, + "_id": "adapter.0.binary_sensor.firealarms.homematic.1.ERROR_SMOKE_CHAMBER-1_ALARM", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "adapter.0.binary_sensor.firealarms.homematic.1.INSTALL_TEST": { + "type": "state", + "common": { + "def": false, + "type": "boolean", + "read": false, + "write": false, + "role": "indicator", + "name": "FireAlarm - HomeMatic.INSTALL_TEST" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229169, + "_id": "adapter.0.binary_sensor.firealarms.homematic.1.INSTALL_TEST", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.1.LOWBAT": { + "type": "state", + "common": { + "def": false, + "type": "boolean", + "read": true, + "write": false, + "role": "indicator.lowbat", + "name": "FireAlarm - HomeMatic.LOWBAT" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229251, + "_id": "adapter.0.binary_sensor.firealarms.homematic.1.LOWBAT", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "user": "system.user.admin" + }, + "adapter.0.binary_sensor.firealarms.homematic.1.STATE": { + "type": "state", + "common": { + "def": false, + "type": "boolean", + "read": true, + "write": false, + "role": "sensor.alarm.fire", + "name": "FireAlarm - HomeMatic.STATE" + }, + "native": {}, + "from": "system.adapter.hm-rega.0", + "ts": 1624785229260, + "_id": "adapter.0.binary_sensor.firealarms.homematic.1.STATE", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + }, + "children": [], + "user": "system.user.admin" + } +} diff --git a/test/testData/light_zigbee_color.json b/test/testData/light_zigbee_color.json index d2e8351bc..facff48d1 100644 --- a/test/testData/light_zigbee_color.json +++ b/test/testData/light_zigbee_color.json @@ -1,5 +1,5 @@ { - "zigbee.0.zigbeeColor": { + "adapter.0.light.zigbeeColor": { "type": "device", "common": { "name": "Zigbee Color", @@ -12,14 +12,14 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1624840690574, - "_id": "zigbee.0.zigbeeColor", + "_id": "adapter.0.light.zigbeeColor", "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, - "zigbee.0.zigbeeColor.available": { + "adapter.0.light.zigbeeColor.available": { "type": "state", "common": { "name": "Available", @@ -32,7 +32,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604598, - "_id": "zigbee.0.zigbeeColor.available", + "_id": "adapter.0.light.zigbeeColor.available", "acl": { "object": 1636, "state": 1636, @@ -40,7 +40,7 @@ "ownerGroup": "system.group.administrator" } }, - "zigbee.0.zigbeeColor.brightness": { + "adapter.0.light.zigbeeColor.brightness": { "type": "state", "common": { "name": "Brightness", @@ -56,7 +56,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604599, - "_id": "zigbee.0.zigbeeColor.brightness", + "_id": "adapter.0.light.zigbeeColor.brightness", "acl": { "object": 1636, "state": 1636, @@ -64,7 +64,7 @@ "ownerGroup": "system.group.administrator" } }, - "zigbee.0.zigbeeColor.brightness_move": { + "adapter.0.light.zigbeeColor.brightness_move": { "type": "state", "common": { "name": "Dimming", @@ -79,7 +79,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1618922883523, - "_id": "zigbee.0.zigbeeColor.brightness_move", + "_id": "adapter.0.light.zigbeeColor.brightness_move", "acl": { "object": 1636, "state": 1636, @@ -87,7 +87,7 @@ "ownerGroup": "system.group.administrator" } }, - "zigbee.0.zigbeeColor.color": { + "adapter.0.light.zigbeeColor.color": { "type": "state", "common": { "name": "Color", @@ -100,7 +100,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604602, - "_id": "zigbee.0.zigbeeColor.color", + "_id": "adapter.0.light.zigbeeColor.color", "acl": { "object": 1636, "state": 1636, @@ -108,7 +108,7 @@ "ownerGroup": "system.group.administrator" } }, - "zigbee.0.zigbeeColor.device_query": { + "adapter.0.light.zigbeeColor.device_query": { "type": "state", "common": { "name": "Trigger device query", @@ -121,7 +121,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1613405434530, - "_id": "zigbee.0.zigbeeColor.device_query", + "_id": "adapter.0.light.zigbeeColor.device_query", "acl": { "object": 1636, "state": 1636, @@ -129,7 +129,7 @@ "ownerGroup": "system.group.administrator" } }, - "zigbee.0.zigbeeColor.groups": { + "adapter.0.light.zigbeeColor.groups": { "type": "state", "common": { "name": "Groups", @@ -142,7 +142,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604603, - "_id": "zigbee.0.zigbeeColor.groups", + "_id": "adapter.0.light.zigbeeColor.groups", "acl": { "object": 1636, "state": 1636, @@ -150,7 +150,7 @@ "ownerGroup": "system.group.administrator" } }, - "zigbee.0.zigbeeColor.link_quality": { + "adapter.0.light.zigbeeColor.link_quality": { "type": "state", "common": { "name": "Link quality", @@ -165,7 +165,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604596, - "_id": "zigbee.0.zigbeeColor.link_quality", + "_id": "adapter.0.light.zigbeeColor.link_quality", "acl": { "object": 1636, "state": 1636, @@ -173,7 +173,7 @@ "ownerGroup": "system.group.administrator" } }, - "zigbee.0.zigbeeColor.state": { + "adapter.0.light.zigbeeColor.state": { "type": "state", "common": { "name": "Switch state", @@ -186,7 +186,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604599, - "_id": "zigbee.0.zigbeeColor.state", + "_id": "adapter.0.light.zigbeeColor.state", "acl": { "object": 1636, "state": 1636, @@ -194,7 +194,7 @@ "ownerGroup": "system.group.administrator" } }, - "zigbee.0.zigbeeColor.transition_time": { + "adapter.0.light.zigbeeColor.transition_time": { "type": "state", "common": { "name": "Transition time", @@ -208,7 +208,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604603, - "_id": "zigbee.0.zigbeeColor.transition_time", + "_id": "adapter.0.light.zigbeeColor.transition_time", "acl": { "object": 1636, "state": 1636, From 51669fc7efb027c79b206334702e8dd43d234b97 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 1 Jul 2021 11:38:09 +0200 Subject: [PATCH 10/35] fix zigbee light test (urgs) --- .../light_integration_tests.js | 4 +- test/testData/light_zigbee_color.json | 40 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/test/integrationTests/light_integration_tests.js b/test/integrationTests/light_integration_tests.js index 26507ddb8..a38eceacf 100644 --- a/test/integrationTests/light_integration_tests.js +++ b/test/integrationTests/light_integration_tests.js @@ -573,9 +573,9 @@ exports.runTests = function (getHarness) { it('zigbee rgbSingle should be controllable', async () => { const harness = getHarness(); const objects = JSON.parse(JSON.stringify(require('../testData/light_zigbee_color.json'))); - const deviceId = 'adapter.0.light.zigbeeColor'; + const deviceId = 'zigbee.0.zigbeeColor'; //MUST start with zigbee in order to have working zigbee workaroung. const entities = await tools.startAndGetEntities(harness, objects, [deviceId], [{id: deviceId + '.state', val: true}, {id: deviceId + '.color', val: '#FF0080'}]); - const entity = entities.find(e => e.context.id === deviceId); + const entity = entities.find(e => e.context.id === deviceId && e.entity_id.startsWith('light')); //prevent device_query. expect(entity).to.be.ok; tools.expectEntity(entity, 'light', deviceId); const ctAttr = entity.context.ATTRIBUTES.find(a => a.attribute === 'rgb_color'); diff --git a/test/testData/light_zigbee_color.json b/test/testData/light_zigbee_color.json index facff48d1..d2e8351bc 100644 --- a/test/testData/light_zigbee_color.json +++ b/test/testData/light_zigbee_color.json @@ -1,5 +1,5 @@ { - "adapter.0.light.zigbeeColor": { + "zigbee.0.zigbeeColor": { "type": "device", "common": { "name": "Zigbee Color", @@ -12,14 +12,14 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1624840690574, - "_id": "adapter.0.light.zigbeeColor", + "_id": "zigbee.0.zigbeeColor", "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }, - "adapter.0.light.zigbeeColor.available": { + "zigbee.0.zigbeeColor.available": { "type": "state", "common": { "name": "Available", @@ -32,7 +32,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604598, - "_id": "adapter.0.light.zigbeeColor.available", + "_id": "zigbee.0.zigbeeColor.available", "acl": { "object": 1636, "state": 1636, @@ -40,7 +40,7 @@ "ownerGroup": "system.group.administrator" } }, - "adapter.0.light.zigbeeColor.brightness": { + "zigbee.0.zigbeeColor.brightness": { "type": "state", "common": { "name": "Brightness", @@ -56,7 +56,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604599, - "_id": "adapter.0.light.zigbeeColor.brightness", + "_id": "zigbee.0.zigbeeColor.brightness", "acl": { "object": 1636, "state": 1636, @@ -64,7 +64,7 @@ "ownerGroup": "system.group.administrator" } }, - "adapter.0.light.zigbeeColor.brightness_move": { + "zigbee.0.zigbeeColor.brightness_move": { "type": "state", "common": { "name": "Dimming", @@ -79,7 +79,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1618922883523, - "_id": "adapter.0.light.zigbeeColor.brightness_move", + "_id": "zigbee.0.zigbeeColor.brightness_move", "acl": { "object": 1636, "state": 1636, @@ -87,7 +87,7 @@ "ownerGroup": "system.group.administrator" } }, - "adapter.0.light.zigbeeColor.color": { + "zigbee.0.zigbeeColor.color": { "type": "state", "common": { "name": "Color", @@ -100,7 +100,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604602, - "_id": "adapter.0.light.zigbeeColor.color", + "_id": "zigbee.0.zigbeeColor.color", "acl": { "object": 1636, "state": 1636, @@ -108,7 +108,7 @@ "ownerGroup": "system.group.administrator" } }, - "adapter.0.light.zigbeeColor.device_query": { + "zigbee.0.zigbeeColor.device_query": { "type": "state", "common": { "name": "Trigger device query", @@ -121,7 +121,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1613405434530, - "_id": "adapter.0.light.zigbeeColor.device_query", + "_id": "zigbee.0.zigbeeColor.device_query", "acl": { "object": 1636, "state": 1636, @@ -129,7 +129,7 @@ "ownerGroup": "system.group.administrator" } }, - "adapter.0.light.zigbeeColor.groups": { + "zigbee.0.zigbeeColor.groups": { "type": "state", "common": { "name": "Groups", @@ -142,7 +142,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604603, - "_id": "adapter.0.light.zigbeeColor.groups", + "_id": "zigbee.0.zigbeeColor.groups", "acl": { "object": 1636, "state": 1636, @@ -150,7 +150,7 @@ "ownerGroup": "system.group.administrator" } }, - "adapter.0.light.zigbeeColor.link_quality": { + "zigbee.0.zigbeeColor.link_quality": { "type": "state", "common": { "name": "Link quality", @@ -165,7 +165,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604596, - "_id": "adapter.0.light.zigbeeColor.link_quality", + "_id": "zigbee.0.zigbeeColor.link_quality", "acl": { "object": 1636, "state": 1636, @@ -173,7 +173,7 @@ "ownerGroup": "system.group.administrator" } }, - "adapter.0.light.zigbeeColor.state": { + "zigbee.0.zigbeeColor.state": { "type": "state", "common": { "name": "Switch state", @@ -186,7 +186,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604599, - "_id": "adapter.0.light.zigbeeColor.state", + "_id": "zigbee.0.zigbeeColor.state", "acl": { "object": 1636, "state": 1636, @@ -194,7 +194,7 @@ "ownerGroup": "system.group.administrator" } }, - "adapter.0.light.zigbeeColor.transition_time": { + "zigbee.0.zigbeeColor.transition_time": { "type": "state", "common": { "name": "Transition time", @@ -208,7 +208,7 @@ "from": "system.adapter.zigbee.0", "user": "system.user.admin", "ts": 1605542604603, - "_id": "adapter.0.light.zigbeeColor.transition_time", + "_id": "zigbee.0.zigbeeColor.transition_time", "acl": { "object": 1636, "state": 1636, From 63958b8e6f4f7a2a39bc8a10c99f7edef57edbc1 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 1 Jul 2021 11:49:24 +0200 Subject: [PATCH 11/35] Update gulpfile.js --- gulpfile.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 6efe19085..128dc2d58 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -582,6 +582,7 @@ gulp.task('translateAndUpdateWordsJS', gulp.series('translate', 'adminLanguages2 gulp.task('default', gulp.series('updatePackages', 'updateReadme')); const devServerPath = __dirname + '/.dev-server/default/'; +const devserverIoBrokerPath = devServerPath + 'node_modules/iobroker.js-controller/iobroker.js'; const spawn = require('child_process').spawn; async function spawnChild(command, params, logmsg, local) { if (logmsg) { @@ -594,7 +595,6 @@ async function spawnChild(command, params, logmsg, local) { } gulp.task('prepareDevserver', async done => { const promises = []; - const devserverIoBrokerPath = devServerPath + 'node_modules/iobroker.js-controller/iobroker.js'; filesWalk(__dirname + '/test/testData', (fileName) => { if (fileName && fileName.toLowerCase().endsWith('.json')) { const objects = JSON.parse(fs.readFileSync(fileName)); @@ -616,7 +616,11 @@ gulp.task('updateDevserver', async done => { await spawnChild(npmCmd, ['install', 'iobroker.devices@latest'], 'Updating devices'); await spawnChild(npmCmd, ['install', 'iobroker.history@latest'], 'Updating history'); await spawnChild(npmCmd, ['install', 'iobroker.type-detector@latest'], 'Updating type-detector'); + await spawnChild('node', [devserverIoBrokerPath, 'upload', 'devices'], 'Uploading devices'); + await spawnChild('node', [devserverIoBrokerPath, 'upload', 'history'], 'Uploading history'); + await spawnChild('node', [devserverIoBrokerPath, 'upload', 'admin'], 'Uploading admin'); await spawnChild(npmCmd, ['link', 'iobroker.lovelace'], 'Linking lovelace'); - await spawnChild(npmCmd, ['install'], 'Reparing dependencies in lovelace', true); + await spawnChild('node', [devserverIoBrokerPath, 'upload', 'lovelace'], 'Uploading lovelace'); + await spawnChild(npmCmd, ['install'], 'Repairing dependencies in lovelace', true); done(); }); From 2236f7642839cd6dc2cd888fbfba7c07a5960079 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 1 Jul 2021 12:58:04 +0200 Subject: [PATCH 12/35] chore: release v2.0.1 fixed: Zigbee lights (issue 222). --- CHANGELOG_OLD.md | 3 +++ README.md | 5 +---- io-package.json | 28 ++++++++++++++-------------- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CHANGELOG_OLD.md b/CHANGELOG_OLD.md index 8a7566380..5cab7b323 100644 --- a/CHANGELOG_OLD.md +++ b/CHANGELOG_OLD.md @@ -1,5 +1,8 @@ # Older Changes +## 1.4.1 (2021-01-08) +* (bluefox) Support of new Let's Encrypt (only with js-controller 3.2.x) + ## 1.3.6 (2021-01-08) * (Garfonso) Fixed: do not ignore devices deleted from iot / without smartName * (Garfosno) Added: Support location devices with one GPS state in string form diff --git a/README.md b/README.md index df323c89d..dc8f32f81 100644 --- a/README.md +++ b/README.md @@ -468,7 +468,7 @@ After that checkout modified version in `./build` folder. Then. PLACEHOLDER for next version: ### **WORK IN PROGRESS** --> -### **WORK IN PROGRESS** +### 2.0.1 (2021-07-01) * (Garfonso) fixed: Zigbee lights (issue 222). ### 2.0.0 (2021-06-17) @@ -504,9 +504,6 @@ After that checkout modified version in `./build` folder. Then. ### 1.4.2 (2021-01-08) * (thost96) Fixed: set Theme state type to string instead of text -### 1.4.1 (2021-01-08) -* (bluefox) Support of new Let's Encrypt (only with js-controller 3.2.x) - ## License Copyright 2019-2021, bluefox diff --git a/io-package.json b/io-package.json index 73850132b..cbba38a0a 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,20 @@ { "common": { "name": "lovelace", - "version": "2.0.0", + "version": "2.0.1", "news": { + "2.0.1": { + "en": "fixed: Zigbee lights (issue 222).", + "de": "behoben: Zigbee-Lichter (Ausgabe 222).", + "ru": "исправлено: огни Zigbee (проблема 222).", + "pt": "consertado: luzes Zigbee (problema 222).", + "nl": "opgelost: Zigbee-lampen (nummer 222).", + "fr": "corrigé: lumières Zigbee (numéro 222).", + "it": "risolto: luci Zigbee (edizione 222).", + "es": "arreglado: luces Zigbee (problema 222).", + "pl": "naprawiono: światła Zigbee (wydanie 222).", + "zh-cn": "固定:Zigbee 灯(问题 222)。" + }, "2.0.0": { "en": "Changed: !Breaking! Battery warning is now binary_sensor instead of sensor (now ui sets icon and translates ok)\nFixed: !Breaking! entity_id conflict for low_bat / humidity when part of another device\nUpdated frontend to 20210603.0 (changed light entity to not convert color anymore)\nChanged: increased file size limit to 5 MB during upload in config.\nAdded: Support for input_datetime\nAdded: Support for manual complex light entities\nAdded: Support for images from base64 data in iobroker states \nAdded: Support for additional alarm states.\nAdded: Parameter to only enter code when disarming alarm\nAdded: Support for admin 5 (jsonCustom)\nAdded: Support for airCondition / rework thermostat\nAdded: manual entities can be more complex now (needs documentation)\nAdded: darkMode control", "de": "Geändert: !Inkompatibel! Batteriewarnung ist jetzt binary_sensor anstelle von sensor (jetzt setzt ui das Symbol und übersetzt ok)\nBehoben: !Inkompatibel! Entity_id-Konflikt für Low_bat / Feuchtigkeit, wenn Teil eines anderen Geräts\nAktualisiertes Frontend auf 20210603.0 (Licht entity hat sich verändert, Farbe werden nicht mehr konvertieren)\nGeändert: Dateigrößenbeschränkung auf 5 MB während des Uploads in config.\nHinzugefügt: Unterstützung für input_datetime\nHinzugefügt: Unterstützung für manuelle komplexe Lichtobjekte\nHinzugefügt: Unterstützung für Bilder aus base64-Daten in iobroker-Zuständen\nHinzugefügt: Unterstützung für zusätzliche Alarmzustände.\nHinzugefügt: Parameter, um nur Code einzugeben, wenn der Alarm deaktiviert wird\nHinzugefügt: Unterstützung für Admin 5 (jsonCustom)\nHinzugefügt: Unterstützung für AirCondition / Rework Thermostat\nHinzugefügt: Manuelle Entitäten können jetzt komplexer sein (benötigt Dokumentation)\nHinzugefügt: DarkMode-Steuerung", @@ -230,18 +242,6 @@ "es": "* (Garfonso) BREAKING: se solucionó el problema con la generación entity_id que ahora permite que las diéresis sean reemplazadas por ue / ae / oe.\n* (Garfonso) agregó el tipo de dispositivo windowsTilt\n* (Garfonso) reelaborado el nombre descriptivo para las entidades generadas automáticamente, deje espacio en el nombre.\n* (Garfonso) usa la función device_class para los sensores (cuando corresponde) -> da como resultado que se usen las funciones de traducción de lovelace.\n* (Garfonso) múltiples correcciones / adiciones al reproductor multimedia (como escala de volumen, soporte de encendido / apagado, soporte aleatorio, detener soporte)\n", "pl": "* (Garfonso) ŁAMANIE: naprawiono problem z generowaniem bytu_id, który teraz pozwala na zastąpienie umlautów przez ue / ae / oe.\n* (Garfonso) dodano typ urządzenia WindowsTilt\n* (Garfonso) przerobiono przyjazną nazwę dla automatycznie generowanych encji, pozostaw miejsce w nazwie.\n* (Garfonso) użyj funkcji device_class dla czujników (w stosownych przypadkach) -> powoduje użycie funkcji tłumaczenia lovelace.\n* (Garfonso) wiele poprawek / dodatków do odtwarzacza multimedialnego (takich jak skalowanie głośności, obsługa włączania / wyłączania, obsługa odtwarzania losowego, obsługa zatrzymywania)\n", "zh-cn": "*(Garfonso)BREAKING:修复了Entity_id生成的问题,该问题现在允许将变音符号替换为ue / ae / oe。\n*(Garfonso)添加了WindowsTilt设备类型\n*(Garfonso)重命名了自动生成的实体的友好名称,名称中留有空格。\n*(Garfonso)对传感器使用device_class功能(如果适用)->导致使用lovelace的翻译功能。\n*(Garfonso)对媒体播放器的多项修复/添加(例如音量缩放,开/关支持,随机播放支持,停止支持)\n" - }, - "1.0.16": { - "en": "webserver initialization optimized again to prevent errors with invalid certificates", - "de": "Die Webserver-Initialisierung wurde erneut optimiert, um Fehler mit ungültigen Zertifikaten zu vermeiden", - "ru": "Инициализация веб-сервера снова оптимизирована для предотвращения ошибок с недействительными сертификатами", - "pt": "inicialização do servidor da web otimizada novamente para evitar erros com certificados inválidos", - "nl": "de initialisatie van de webserver is opnieuw geoptimaliseerd om fouten met ongeldige certificaten te voorkomen", - "fr": "initialisation du serveur Web optimisée à nouveau pour éviter les erreurs avec des certificats invalides", - "it": "inizializzazione del server web nuovamente ottimizzata per prevenire errori con certificati non validi", - "es": "La inicialización del servidor web se optimizó nuevamente para evitar errores con certificados no válidos", - "pl": "inicjalizacja serwera WWW została ponownie zoptymalizowana, aby zapobiec błędom z nieprawidłowymi certyfikatami", - "zh-cn": "再次优化了Web服务器的初始化,以防止证书无效而出错" } }, "title": "Visualization with Lovelace-UI", @@ -622,4 +622,4 @@ "native": {} } ] -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b13c5ddce..0146c9ed2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "iobroker.lovelace", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 57a0a1ad4..d33f055f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.lovelace", - "version": "2.0.0", + "version": "2.0.1", "description": "With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI", "author": { "name": "bluefox", From 9a4e02517c666eff66bd8d7985ea9d6b3b77160c Mon Sep 17 00:00:00 2001 From: Garfonso Date: Fri, 2 Jul 2021 16:21:41 +0200 Subject: [PATCH 13/35] type-detector does not deliver HUMIDTY0, PRESSURE0, WIND_SPEED0, WIND_DIRECTION0 --- lib/converters/weather.js | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/lib/converters/weather.js b/lib/converters/weather.js index 8d648216c..0d7c1ec02 100644 --- a/lib/converters/weather.js +++ b/lib/converters/weather.js @@ -30,52 +30,24 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, if (state && state.id) { entity.context.ATTRIBUTES.push({attribute: 'pressure', getId: state.id}); utils.addID2entity(state.id, entity); - } else { - state = control.states.find(s => s.id && s.name === 'PRESSURE0'); - if (state && state.id) { - entity.context.ATTRIBUTES.push({attribute: 'pressure', getId: state.id}); - utils.addID2entity(state.id, entity); - state.id = null; // do not detect it later - } } state = control.states.find(s => s.id && s.name === 'HUMIDITY'); if (state && state.id) { entity.context.ATTRIBUTES.push({attribute: 'humidity', getId: state.id}); utils.addID2entity(state.id, entity); - } else { - state = control.states.find(s => s.id && s.name === 'HUMIDITY0'); - if (state && state.id) { - entity.context.ATTRIBUTES.push({attribute: 'humidity', getId: state.id}); - utils.addID2entity(state.id, entity); - state.id = null; // do not detect it later - } } state = control.states.find(s => s.id && s.name === 'WIND_SPEED'); if (state && state.id) { entity.context.ATTRIBUTES.push({attribute: 'wind_speed', getId: state.id}); utils.addID2entity(state.id, entity); - } else { - state = control.states.find(s => s.id && s.name === 'WIND_SPEED0'); - if (state && state.id) { - entity.context.ATTRIBUTES.push({attribute: 'wind_speed', getId: state.id}); - utils.addID2entity(state.id, entity); - state.id = null; // do not detect it later - } } state = control.states.find(s => s.id && s.name === 'WIND_DIRECTION'); // in ° if (state && state.id) { entity.context.ATTRIBUTES.push({attribute: 'wind_bearing', getId: state.id}); utils.addID2entity(state.id, entity); - } else { - state = control.states.find(s => s.id && s.name === 'WIND_DIRECTION0'); // in ° - if (state && state.id) { - entity.context.ATTRIBUTES.push({attribute: 'wind_bearing', getId: state.id}); - utils.addID2entity(state.id, entity); - state.id = null; // do not detect it later - } } // forecast {datetime: something for new Date(aa), temperature, templow, condition(see STATE), precipitation} From 4ac2c1dc20b0e6d6901e274c184c38faa5905484 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 12:37:27 +0200 Subject: [PATCH 14/35] fix shifted weather if no date state --- lib/converters/weather.js | 28 +- lib/server.js | 17 +- test/integrationTests/index.js | 6 + test/integrationTests/testTools.js | 2 +- .../weather_integration_tests.js | 467 +++ test/testData/weather_accuweather.json | 1126 +++++++ test/testData/weather_daswetter.json | 2124 ++++++++++++ test/testData/weather_weatherunderground.json | 2861 +++++++++++++++++ 8 files changed, 6610 insertions(+), 21 deletions(-) create mode 100644 test/integrationTests/weather_integration_tests.js create mode 100644 test/testData/weather_accuweather.json create mode 100644 test/testData/weather_daswetter.json create mode 100644 test/testData/weather_weatherunderground.json diff --git a/lib/converters/weather.js b/lib/converters/weather.js index 0d7c1ec02..8e7b713ed 100644 --- a/lib/converters/weather.js +++ b/lib/converters/weather.js @@ -1,5 +1,22 @@ const utils = require('./utils'); +// Possible states if non icon: +// "clear-night", +// "cloudy", +// "exceptional", +// "fog", +// "hail", +// "lightning", +// "lightning-rainy", +// "partlycloudy", +// "pouring", +// "rainy", +// "snowy", +// "snowy-rainy", +// "sunny", +// "windy", +// "windy-variant", + exports.processWeather = function (id, control, name, room, func, _obj, objects, forcedEntityId) { const entity = utils.processCommon(name, room, func, _obj, 'weather', forcedEntityId); @@ -55,7 +72,7 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, let somethingFound; let hassCounter = -1; - for (let day = 0; day < 6; day++) { + for (let day = 1; day < 8; day++) { let dayShiftId; somethingFound = false; state = control.states.find(s => s.id && s.name === 'ICON' + day); @@ -132,10 +149,13 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, } else if (dayShiftId) { entity.context.ATTRIBUTES.push({ attribute: `forecast.${hassCounter}.datetime`, - dayShift: hassCounter, + dayShift: day, getId: dayShiftId, - getParser: (entity, attr) => { - const date = new Date(); + getParser: (entity, attr, state) => { + let date = new Date(); + if (state && state.ts) { + date = new Date(state.ts); + } attr.dayShift && date.setDate(date.getDate() + attr.dayShift); utils.setJsonAttribute(entity.attributes, attr.attribute, date.toISOString()); } diff --git a/lib/server.js b/lib/server.js index ff69b01ac..7c7bcee7d 100644 --- a/lib/server.js +++ b/lib/server.js @@ -174,7 +174,7 @@ class WebServer { [Types.image]: processImage, [Types.fireAlarm]: converterBinarySensors.processFireAlarm }; - + const concurrentPromises = [ this.adapter.getForeignObjectAsync('system.config') .then(config => { @@ -1849,21 +1849,6 @@ class WebServer { } } - //var t = [ - // [{ - // "attributes": { - // "attribution": "Weather forecast from met.no, delivered by the Norwegian Meteorological Institute.", - // "entity_picture": "https://api.met.no/weatherapi/weathericon/1.1/?symbol=None;content_type=image/png", - // "friendly_name": "yr Symbol" - // }, - // "context": {"id": "1969195c53b54e9593e3a7c50425fd9d", "parent_id": null, "user_id": null}, - // "entity_id": "sensor.yr_symbol", - // "last_changed": "2019-05-21T11:14:39.714000+00:00", - // "last_updated": "2019-05-21T11:14:39.714000+00:00", - // "state": "unknown" - // }] - //] - //match attributes to states by ts: const getAttributeValues = (ts, attributesResult, attributesUsed = [], attributeValues = {}) => { if (entity.context.ATTRIBUTES) { diff --git a/test/integrationTests/index.js b/test/integrationTests/index.js index 0be652b09..2a833c9b4 100644 --- a/test/integrationTests/index.js +++ b/test/integrationTests/index.js @@ -3,6 +3,7 @@ const climate_tests = require('./climate_integration_tests'); const input_select_tests = require('./input_select_tests'); const light_tests = require('./light_integration_tests'); const sensor_tests = require('./sensor_integration_tests'); +const weather_tests = require('./weather_integration_tests'); const object_change_tests = require('./objects_change_tests'); const custom_settings_tests = require('./custom_settings_tests'); @@ -32,6 +33,10 @@ exports.runTests = function (getHarness) { await sensor_tests.runTests(getHarness); }); + describe('Test weather', async () => { + await weather_tests.runTests(getHarness); + }) + describe('Test object changes', async () => { await object_change_tests.runTests(getHarness); }); @@ -39,4 +44,5 @@ exports.runTests = function (getHarness) { describe('Test custom settings', async () => { await custom_settings_tests.runTests(getHarness); }); + }; diff --git a/test/integrationTests/testTools.js b/test/integrationTests/testTools.js index 33b1733d8..edea03b0a 100644 --- a/test/integrationTests/testTools.js +++ b/test/integrationTests/testTools.js @@ -211,7 +211,7 @@ exports.validateStateChange = async function (harness, entity_id, changeState, v if (m.type === 'event' && m.event && m.event.event_type === 'state_changed') { const data = m.event.data; if (data.entity_id === entity_id) { - console.dir(data.new_state); + console.dir(data.new_state, {depth: null}); validator(data.new_state); //pass new entity to validator. currentClient.removeEventListener('message', eventListener); resolve(); diff --git a/test/integrationTests/weather_integration_tests.js b/test/integrationTests/weather_integration_tests.js new file mode 100644 index 000000000..1dee216f9 --- /dev/null +++ b/test/integrationTests/weather_integration_tests.js @@ -0,0 +1,467 @@ +const tools = require('./testTools'); +const expect = require('chai').expect; + +async function testUpdates(harness, states, entity) { + for (const state of states) { + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(state.iobId, state.updatedValue), + entity => { + if (state.attribute === 'state') { + expect(entity).to.have.property('state', state.updatedValue); + } else { + expect(entity).to.have.nested.property('attributes.' + state.attribute, state.updatedValue); + } + }); + } +} + +exports.runTests = function (getHarness) { + it('should create weather entity for accuweather and update correctly', async () => { + const harness = getHarness(); + const objects = require('../testData/weather_accuweather.json'); + const deviceId = 'accuweather.0.Summary'; + + const states = [{ + attribute: 'state', + iobId: deviceId + '.WeatherIconURL', + initialValue: 'iconURL', + updatedValue: 'iconURLUpdated' + }, { + attribute: 'temperature', + iobId: deviceId + '.Temperature', + initialValue: 25, + updatedValue: 30 + }, { + attribute: 'pressure', + iobId: deviceId + '.Pressure', + initialValue: 10, + updatedValue: 11 + }, { + attribute: 'humidity', + iobId: deviceId + '.RelativeHumidity', + initialValue: 30, + updatedValue: 40 + }, { + attribute: 'wind_speed', + iobId: deviceId + '.WindSpeed', + initialValue: 5, + updatedValue: 8 + }, { + attribute: 'wind_bearing', + iobId: deviceId + '.WindDirection', + initialValue: 90, + updatedValue: 180 + }, { + attribute: 'forecast.0.condition', + iobId: deviceId + '.WeatherIconURL_d2', + initialValue: 'iconURL1', + updatedValue: 'iconURL1Updated' + }, { + attribute: 'forecast.0.temperature', + iobId: deviceId + '.TempMax_d2', + initialValue: 10, + updatedValue: 11 + }, { + attribute: 'forecast.0.templow', + iobId: deviceId + '.TempMin_d2', + initialValue: 8, + updatedValue: 9 + }, { + attribute: 'forecast.0.precipitation_probability', + iobId: deviceId + '.PrecipitationProbability_d2', + initialValue: 50, + updatedValue: 60 + }, { + attribute: 'forecast.0.precipitation', + iobId: deviceId + '.TotalLiquidVolume_d2', + initialValue: 500, + updatedValue: 600 + }, { + attribute: 'forecast.0.datetime', + iobId: deviceId + '.DateTime_d2', + initialValue: 'Do', + updatedValue: 'Fr' + }, { + attribute: 'forecast.1.condition', + iobId: deviceId + '.WeatherIconURL_d3', + initialValue: 'iconURL2', + updatedValue: 'iconURL2Updated' + }, { + attribute: 'forecast.1.temperature', + iobId: deviceId + '.TempMax_d3', + initialValue: 12, + updatedValue: 13 + }, { + attribute: 'forecast.1.templow', + iobId: deviceId + '.TempMin_d3', + initialValue: 7, + updatedValue: 8 + }, { + attribute: 'forecast.1.precipitation_probability', + iobId: deviceId + '.PrecipitationProbability_d3', + initialValue: 51, + updatedValue: 61 + }, { + attribute: 'forecast.1.precipitation', + iobId: deviceId + '.TotalLiquidVolume_d3', + initialValue: 501, + updatedValue: 601 + }, { + attribute: 'forecast.1.datetime', + iobId: deviceId + '.DateTime_d3', + initialValue: 'Fr', + updatedValue: 'Sa' + }, { + attribute: 'forecast.2.condition', + iobId: deviceId + '.WeatherIconURL_d4', + initialValue: 'iconURL3', + updatedValue: 'iconURL3Updated' + }, { + attribute: 'forecast.2.temperature', + iobId: deviceId + '.TempMax_d4', + initialValue: 14, + updatedValue: 15 + }, { + attribute: 'forecast.2.templow', + iobId: deviceId + '.TempMin_d4', + initialValue: 4, + updatedValue: 5 + }, { + attribute: 'forecast.2.precipitation_probability', + iobId: deviceId + '.PrecipitationProbability_d4', + initialValue: 52, + updatedValue: 62 + }, { + attribute: 'forecast.2.precipitation', + iobId: deviceId + '.TotalLiquidVolume_d4', + initialValue: 502, + updatedValue: 602 + }, { + attribute: 'forecast.2.datetime', + iobId: deviceId + '.DateTime_d4', + initialValue: 'Sa', + updatedValue: 'So' + }, { + attribute: 'forecast.3.condition', + iobId: deviceId + '.WeatherIconURL_d5', + initialValue: 'iconURL4', + updatedValue: 'iconURL4Updated' + }, { + attribute: 'forecast.3.temperature', + iobId: deviceId + '.TempMax_d5', + initialValue: 20, + updatedValue: 21 + }, { + attribute: 'forecast.3.templow', + iobId: deviceId + '.TempMin_d5', + initialValue: 10, + updatedValue: 12 + }, { + attribute: 'forecast.3.precipitation_probability', + iobId: deviceId + '.PrecipitationProbability_d5', + initialValue: 53, + updatedValue: 63 + }, { + attribute: 'forecast.3.precipitation', + iobId: deviceId + '.TotalLiquidVolume_d5', + initialValue: 503, + updatedValue: 603 + }, { + attribute: 'forecast.3.datetime', + iobId: deviceId + '.DateTime_d5', + initialValue: 'So', + updatedValue: 'Mo' + }]; + const entities = await tools.startAndGetEntities(harness, objects, [deviceId], states.map(s => { return {id: s.iobId, val: s.initialValue}; })); + expect(entities.length).to.be.at.least(1 + tools.getNumConstEntities()); + const entity = entities.find(e => e.context.id === deviceId && e.entity_id.startsWith('weather.')); + expect(entity).to.be.ok; + + expect(entity).to.have.property('state', 'iconURL'); + for (const state of states) { + if (state.attribute !== 'state') { + expect(entity).to.have.nested.property('attributes.' + state.attribute, state.initialValue); + } + } + await testUpdates(harness, states, entity); + }); + + it('should create weather entity for daswetter with right data on right days and update correctly', async () => { + const harness = getHarness(); + const objects = require('../testData/weather_daswetter.json'); + const deviceId = 'daswetter.0.NextDays.Location_1'; + + const states = [{ + attribute: 'state', + iobId: deviceId + '.Day_1.iconURL', + initialValue: 'iconURL', + updatedValue: 'iconURLUpdated' + }, { + attribute: 'temperature', + iobId: deviceId + '.Day_1.Maximale_Temperatur_value', + initialValue: 25, + updatedValue: 30 + }, { + attribute: 'forecast.0.condition', + iobId: deviceId + '.Day_2.iconURL', + initialValue: 'iconURL1', + updatedValue: 'iconURL1Updated' + }, { + attribute: 'forecast.0.temperature', + iobId: deviceId + '.Day_2.Maximale_Temperatur_value', + initialValue: 10, + updatedValue: 11 + }, { + attribute: 'forecast.0.templow', + iobId: deviceId + '.Day_2.Minimale_Temperatur_value', + initialValue: 8, + updatedValue: 9 + }, { + attribute: 'forecast.1.condition', + iobId: deviceId + '.Day_3.iconURL', + initialValue: 'iconURL2', + updatedValue: 'iconURL2Updated' + }, { + attribute: 'forecast.1.temperature', + iobId: deviceId + '.Day_3.Maximale_Temperatur_value', + initialValue: 12, + updatedValue: 13 + }, { + attribute: 'forecast.1.templow', + iobId: deviceId + '.Day_3.Minimale_Temperatur_value', + initialValue: 7, + updatedValue: 8 + }, { + attribute: 'forecast.2.condition', + iobId: deviceId + '.Day_4.iconURL', + initialValue: 'iconURL3', + updatedValue: 'iconURL3Updated' + }, { + attribute: 'forecast.2.temperature', + iobId: deviceId + '.Day_4.Maximale_Temperatur_value', + initialValue: 14, + updatedValue: 15 + }, { + attribute: 'forecast.2.templow', + iobId: deviceId + '.Day_4.Minimale_Temperatur_value', + initialValue: 4, + updatedValue: 5 + }, { + attribute: 'forecast.3.condition', + iobId: deviceId + '.Day_5.iconURL', + initialValue: 'iconURL4', + updatedValue: 'iconURL4Updated' + }, { + attribute: 'forecast.3.temperature', + iobId: deviceId + '.Day_5.Maximale_Temperatur_value', + initialValue: 20, + updatedValue: 21 + }, { + attribute: 'forecast.3.templow', + iobId: deviceId + '.Day_5.Minimale_Temperatur_value', + initialValue: 10, + updatedValue: 12 + }, { + attribute: 'forecast.4.condition', + iobId: deviceId + '.Day_6.iconURL', + initialValue: 'iconURL5', + updatedValue: 'iconURL5Updated' + }, { + attribute: 'forecast.4.temperature', + iobId: deviceId + '.Day_6.Maximale_Temperatur_value', + initialValue: 30, + updatedValue: 31 + }, { + attribute: 'forecast.4.templow', + iobId: deviceId + '.Day_6.Minimale_Temperatur_value', + initialValue: 13, + updatedValue: 14 + }, { + attribute: 'forecast.5.condition', + iobId: deviceId + '.Day_7.iconURL', + initialValue: 'iconURL6', + updatedValue: 'iconURL6Updated' + }, { + attribute: 'forecast.5.temperature', + iobId: deviceId + '.Day_7.Maximale_Temperatur_value', + initialValue: 25, + updatedValue: 28 + }, { + attribute: 'forecast.5.templow', + iobId: deviceId + '.Day_7.Minimale_Temperatur_value', + initialValue: 15, + updatedValue: 17 + }]; + const entities = await tools.startAndGetEntities(harness, objects, [deviceId], states.map(s => { return {id: s.iobId, val: s.initialValue}; })); + expect(entities.length).to.be.at.least(1 + tools.getNumConstEntities()); + const entity = entities.find(e => e.context.id === deviceId && e.entity_id.startsWith('weather.')); + expect(entity).to.be.ok; + + expect(entity).to.have.property('state', 'iconURL'); + for (const state of states) { + if (state.attribute !== 'state') { + expect(entity).to.have.nested.property('attributes.' + state.attribute, state.initialValue); + } + } + + for (let day = 0; day < 6; day += 1) { + const forecast = entity.attributes.forecast[day]; + expect(forecast).to.have.property('datetime'); + const date = new Date(forecast.datetime); + expect(date).to.be.ok; + const now = new Date(); + expect(date.getDate()).to.equal(now.getDate() + day + 1); + } + + await testUpdates(harness, states, entity); + + const newTS = Date.now() - (10 * 24 * 60 * 60 * 1000); + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId + '.Day_7.iconURL', {val: 'icon6URLNeu', ts: newTS, ack: true}), + entity => { + const date = new Date(entity.attributes.forecast[5].datetime); + const controlDate = new Date(newTS); + expect(date.getDate()).to.equal(controlDate.getDate() +6); + }); + }); + + it('should create weather entity for weatherunderground', async () => { + const harness = getHarness(); + const objects = require('../testData/weather_weatherunderground.json'); + const deviceId = 'weatherunderground.0.forecast'; + + const states = [{ + attribute: 'state', + iobId: deviceId + '.0d.iconURL', + initialValue: 'iconURL', + updatedValue: 'iconURLUpdated' + }, { + attribute: 'temperature', + iobId: deviceId + '.current.temp', + initialValue: 25, + updatedValue: 30 + }, { + attribute: 'pressure', + iobId: deviceId + '.current.pressure', + initialValue: 10, + updatedValue: 11 + }, { + attribute: 'humidity', + iobId: deviceId + '.0d.humidity', + initialValue: 30, + updatedValue: 40 + }, { + attribute: 'wind_speed', + iobId: deviceId + '.0d.windSpeed', + initialValue: 5, + updatedValue: 8 + }, { + attribute: 'wind_bearing', + iobId: deviceId + '.0d.windDegrees', + initialValue: 90, + updatedValue: 180 + }, { + attribute: 'forecast.0.condition', + iobId: deviceId + '.1d.iconURL', + initialValue: 'iconURL1', + updatedValue: 'iconURL1Updated' + }, { + attribute: 'forecast.0.temperature', + iobId: deviceId + '.1d.tempMax', + initialValue: 10, + updatedValue: 11 + }, { + attribute: 'forecast.0.templow', + iobId: deviceId + '.1d.tempMin', + initialValue: 8, + updatedValue: 9 + }, { + attribute: 'forecast.0.precipitation_probability', + iobId: deviceId + '.1d.precipitationChance', + initialValue: 50, + updatedValue: 60 + }, { + attribute: 'forecast.0.datetime', + iobId: deviceId + '.1d.date', + initialValue: 'Do', + updatedValue: 'Fr' + }, { + attribute: 'forecast.0.humidity', + iobId: deviceId + '.1d.humidity', + initialValue: 34, + updatedValue: 45 + }, { + attribute: 'forecast.1.condition', + iobId: deviceId + '.2d.iconURL', + initialValue: 'iconURL2', + updatedValue: 'iconURL2Updated' + }, { + attribute: 'forecast.1.temperature', + iobId: deviceId + '.2d.tempMax', + initialValue: 12, + updatedValue: 13 + }, { + attribute: 'forecast.1.templow', + iobId: deviceId + '.2d.tempMin', + initialValue: 7, + updatedValue: 8 + }, { + attribute: 'forecast.1.precipitation_probability', + iobId: deviceId + '.2d.precipitationChance', + initialValue: 51, + updatedValue: 61 + }, { + attribute: 'forecast.1.datetime', + iobId: deviceId + '.2d.date', + initialValue: 'Fr', + updatedValue: 'Sa' + }, { + attribute: 'forecast.1.humidity', + iobId: deviceId + '.2d.humidity', + initialValue: 51, + updatedValue: 60 + }, { + attribute: 'forecast.2.condition', + iobId: deviceId + '.3d.iconURL', + initialValue: 'iconURL3', + updatedValue: 'iconURL3Updated' + }, { + attribute: 'forecast.2.temperature', + iobId: deviceId + '.3d.tempMax', + initialValue: 14, + updatedValue: 15 + }, { + attribute: 'forecast.2.templow', + iobId: deviceId + '.3d.tempMin', + initialValue: 4, + updatedValue: 5 + }, { + attribute: 'forecast.2.precipitation_probability', + iobId: deviceId + '.3d.precipitationChance', + initialValue: 52, + updatedValue: 62 + }, { + attribute: 'forecast.2.datetime', + iobId: deviceId + '.3d.date', + initialValue: 'Sa', + updatedValue: 'So' + }, { + attribute: 'forecast.2.humidity', + iobId: deviceId + '.3d.humidity', + initialValue: 32, + updatedValue: 41 + }]; + const entities = await tools.startAndGetEntities(harness, objects, [deviceId], states.map(s => { return {id: s.iobId, val: s.initialValue}; })); + expect(entities.length).to.be.at.least(1 + tools.getNumConstEntities()); + const entity = entities.find(e => e.context.id === deviceId && e.entity_id.startsWith('weather.')); + expect(entity).to.be.ok; + + expect(entity).to.have.property('state', 'iconURL'); + for (const state of states) { + if (state.attribute !== 'state') { + expect(entity).to.have.nested.property('attributes.' + state.attribute, state.initialValue); + } + } + await testUpdates(harness, states, entity); + }); +}; diff --git a/test/testData/weather_accuweather.json b/test/testData/weather_accuweather.json new file mode 100644 index 000000000..c95dba502 --- /dev/null +++ b/test/testData/weather_accuweather.json @@ -0,0 +1,1126 @@ +{ + "accuweather.0.Summary": { + "type": "channel", + "common": { + "name": "Weather Summary" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222154033, + "_id": "accuweather.0.Summary" + }, + "accuweather.0.Summary.CurrentDateTime": { + "type": "state", + "common": { + "name": "Forecast date", + "type": "string", + "read": true, + "write": false, + "role": "date.forecast.0" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155034, + "_id": "accuweather.0.Summary.CurrentDateTime" + }, + "accuweather.0.Summary.DateTime_d1": { + "type": "state", + "common": { + "name": "Forecast date day 1", + "type": "string", + "read": true, + "write": false, + "role": "date.forecast.0" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155036, + "_id": "accuweather.0.Summary.DateTime_d1" + }, + "accuweather.0.Summary.DateTime_d2": { + "type": "state", + "common": { + "name": "Forecast date day 2", + "type": "string", + "read": true, + "write": false, + "role": "date.forecast.1" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.DateTime_d2" + }, + "accuweather.0.Summary.DateTime_d3": { + "type": "state", + "common": { + "name": "Forecast date day 3", + "type": "string", + "read": true, + "write": false, + "role": "date.forecast.2" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.DateTime_d3" + }, + "accuweather.0.Summary.DateTime_d4": { + "type": "state", + "common": { + "name": "Forecast date day 4", + "type": "string", + "read": true, + "write": false, + "role": "date.forecast.3" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.DateTime_d4" + }, + "accuweather.0.Summary.DateTime_d5": { + "type": "state", + "common": { + "name": "Forecast date day 5", + "type": "string", + "read": true, + "write": false, + "role": "date.forecast.4" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.DateTime_d5" + }, + "accuweather.0.Summary.DayOfWeek": { + "type": "state", + "common": { + "name": "Day of week", + "type": "string", + "read": true, + "write": false, + "role": "dayofweek.forecast.0", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155035, + "_id": "accuweather.0.Summary.DayOfWeek" + }, + "accuweather.0.Summary.DayOfWeek_d1": { + "type": "state", + "common": { + "name": "Day of week day 1", + "type": "string", + "read": true, + "write": false, + "role": "dayofweek.forecast.0", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.DayOfWeek_d1" + }, + "accuweather.0.Summary.DayOfWeek_d2": { + "type": "state", + "common": { + "name": "Day of week day 2", + "type": "string", + "read": true, + "write": false, + "role": "dayofweek.forecast.1", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.DayOfWeek_d2" + }, + "accuweather.0.Summary.DayOfWeek_d3": { + "type": "state", + "common": { + "name": "Day of week day 3", + "type": "string", + "read": true, + "write": false, + "role": "dayofweek.forecast.2", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.DayOfWeek_d3" + }, + "accuweather.0.Summary.DayOfWeek_d4": { + "type": "state", + "common": { + "name": "Day of week day 4", + "type": "string", + "read": true, + "write": false, + "role": "dayofweek.forecast.3", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.DayOfWeek_d4" + }, + "accuweather.0.Summary.DayOfWeek_d5": { + "type": "state", + "common": { + "name": "Day of week day 5", + "type": "string", + "read": true, + "write": false, + "role": "dayofweek.forecast.4", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.DayOfWeek_d5" + }, + "accuweather.0.Summary.PrecipitationProbability_d1": { + "type": "state", + "common": { + "name": "Precipitation Probability day 1", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.0", + "unit": "%" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.PrecipitationProbability_d1" + }, + "accuweather.0.Summary.PrecipitationProbability_d2": { + "type": "state", + "common": { + "name": "Precipitation Probability day 2", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.1", + "unit": "%" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.PrecipitationProbability_d2" + }, + "accuweather.0.Summary.PrecipitationProbability_d3": { + "type": "state", + "common": { + "name": "Precipitation Probability day 3", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.2", + "unit": "%" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.PrecipitationProbability_d3" + }, + "accuweather.0.Summary.PrecipitationProbability_d4": { + "type": "state", + "common": { + "name": "Precipitation Probability day 4", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.3", + "unit": "%" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.PrecipitationProbability_d4" + }, + "accuweather.0.Summary.PrecipitationProbability_d5": { + "type": "state", + "common": { + "name": "Precipitation Probability day 5", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.4", + "unit": "%" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.PrecipitationProbability_d5" + }, + "accuweather.0.Summary.Pressure": { + "type": "state", + "common": { + "name": "Pressure", + "type": "number", + "read": true, + "write": false, + "role": "value.pressure", + "unit": "mmHg" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155035, + "_id": "accuweather.0.Summary.Pressure" + }, + "accuweather.0.Summary.RealFeelTemperature": { + "type": "state", + "common": { + "name": "Feels Like Temperature", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.feelslike.forecast.0", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155035, + "_id": "accuweather.0.Summary.RealFeelTemperature" + }, + "accuweather.0.Summary.RelativeHumidity": { + "type": "state", + "common": { + "name": "Humidity", + "type": "number", + "read": true, + "write": false, + "role": "value.humidity.forecast.0", + "unit": "%" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155035, + "_id": "accuweather.0.Summary.RelativeHumidity" + }, + "accuweather.0.Summary.Sunrise": { + "type": "state", + "common": { + "name": "Sunrise time", + "type": "string", + "read": true, + "write": false, + "role": "time.sunrise", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155036, + "_id": "accuweather.0.Summary.Sunrise" + }, + "accuweather.0.Summary.Sunset": { + "type": "state", + "common": { + "name": "Sunset time", + "type": "string", + "read": true, + "write": false, + "role": "time.sunset", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155036, + "_id": "accuweather.0.Summary.Sunset" + }, + "accuweather.0.Summary.TempMax_d1": { + "type": "state", + "common": { + "name": "Max Temperature day 1", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.max.forecast.0", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155036, + "_id": "accuweather.0.Summary.TempMax_d1" + }, + "accuweather.0.Summary.TempMax_d2": { + "type": "state", + "common": { + "name": "Max Temperature day 2", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.max.forecast.1", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.TempMax_d2" + }, + "accuweather.0.Summary.TempMax_d3": { + "type": "state", + "common": { + "name": "Max Temperature day 3", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.max.forecast.2", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.TempMax_d3" + }, + "accuweather.0.Summary.TempMax_d4": { + "type": "state", + "common": { + "name": "Max Temperature day 4", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.max.forecast.3", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.TempMax_d4" + }, + "accuweather.0.Summary.TempMax_d5": { + "type": "state", + "common": { + "name": "Max Temperature day 5", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.max.forecast.4", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.TempMax_d5" + }, + "accuweather.0.Summary.TempMin_d1": { + "type": "state", + "common": { + "name": "Min Temperature day 1", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.min.forecast.0", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155036, + "_id": "accuweather.0.Summary.TempMin_d1" + }, + "accuweather.0.Summary.TempMin_d2": { + "type": "state", + "common": { + "name": "Min Temperature day 2", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.min.forecast.1", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.TempMin_d2" + }, + "accuweather.0.Summary.TempMin_d3": { + "type": "state", + "common": { + "name": "Min Temperature day 3", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.min.forecast.2", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.TempMin_d3" + }, + "accuweather.0.Summary.TempMin_d4": { + "type": "state", + "common": { + "name": "Min Temperature day 4", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.min.forecast.3", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.TempMin_d4" + }, + "accuweather.0.Summary.TempMin_d5": { + "type": "state", + "common": { + "name": "Min Temperature day 5", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.min.forecast.4", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.TempMin_d5" + }, + "accuweather.0.Summary.Temperature": { + "type": "state", + "common": { + "name": "Temperature", + "type": "number", + "read": true, + "write": false, + "role": "value.temperature.forecast.0", + "unit": "°C" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155034, + "_id": "accuweather.0.Summary.Temperature" + }, + "accuweather.0.Summary.TotalLiquidVolume_d1": { + "type": "state", + "common": { + "name": "Total Precipitation Amount day 1", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.0", + "unit": "mm" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.TotalLiquidVolume_d1" + }, + "accuweather.0.Summary.TotalLiquidVolume_d2": { + "type": "state", + "common": { + "name": "Total Precipitation Amount day 2", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.1", + "unit": "mm" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.TotalLiquidVolume_d2" + }, + "accuweather.0.Summary.TotalLiquidVolume_d3": { + "type": "state", + "common": { + "name": "Total Precipitation Amount day 3", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.2", + "unit": "mm" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.TotalLiquidVolume_d3" + }, + "accuweather.0.Summary.TotalLiquidVolume_d4": { + "type": "state", + "common": { + "name": "Total Precipitation Amount day 4", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.3", + "unit": "mm" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.TotalLiquidVolume_d4" + }, + "accuweather.0.Summary.TotalLiquidVolume_d5": { + "type": "state", + "common": { + "name": "Total Precipitation Amount day 5", + "type": "number", + "read": true, + "write": false, + "role": "value.precipitation.forecast.4", + "unit": "mm" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155042, + "_id": "accuweather.0.Summary.TotalLiquidVolume_d5" + }, + "accuweather.0.Summary.WeatherIcon": { + "type": "state", + "common": { + "name": "Weather Icon", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.name.forecast.0" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155034, + "_id": "accuweather.0.Summary.WeatherIcon" + }, + "accuweather.0.Summary.WeatherIconURL": { + "type": "state", + "common": { + "name": "SVG Weather Icon URL", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.forecast.0" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155034, + "_id": "accuweather.0.Summary.WeatherIconURL" + }, + "accuweather.0.Summary.WeatherIconURL_d2": { + "type": "state", + "common": { + "name": "SVG Weather Icon URL day 2", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.forecast.1" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.WeatherIconURL_d2" + }, + "accuweather.0.Summary.WeatherIconURL_d3": { + "type": "state", + "common": { + "name": "SVG Weather Icon URL day 3", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.forecast.2" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.WeatherIconURL_d3" + }, + "accuweather.0.Summary.WeatherIconURL_d4": { + "type": "state", + "common": { + "name": "SVG Weather Icon URL day 4", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.forecast.3" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.WeatherIconURL_d4" + }, + "accuweather.0.Summary.WeatherIconURL_d5": { + "type": "state", + "common": { + "name": "SVG Weather Icon URL day 5", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.forecast.4" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.WeatherIconURL_d5" + }, + "accuweather.0.Summary.WeatherIcon_d1": { + "type": "state", + "common": { + "name": "Weather Icon day 1", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.name.forecast.0" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155036, + "_id": "accuweather.0.Summary.WeatherIcon_d1" + }, + "accuweather.0.Summary.WeatherIcon_d2": { + "type": "state", + "common": { + "name": "Weather Icon day 2", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.name.forecast.1" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.WeatherIcon_d2" + }, + "accuweather.0.Summary.WeatherIcon_d3": { + "type": "state", + "common": { + "name": "Weather Icon day 3", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.name.forecast.2" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.WeatherIcon_d3" + }, + "accuweather.0.Summary.WeatherIcon_d4": { + "type": "state", + "common": { + "name": "Weather Icon day 4", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.name.forecast.3" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.WeatherIcon_d4" + }, + "accuweather.0.Summary.WeatherIcon_d5": { + "type": "state", + "common": { + "name": "Weather Icon day 5", + "type": "string", + "read": true, + "write": false, + "role": "weather.icon.name.forecast.4" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.WeatherIcon_d5" + }, + "accuweather.0.Summary.WeatherText": { + "type": "state", + "common": { + "name": "Weather Description", + "type": "string", + "read": true, + "write": false, + "role": "weather.state.forecast.0" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155034, + "_id": "accuweather.0.Summary.WeatherText" + }, + "accuweather.0.Summary.WeatherText_d1": { + "type": "state", + "common": { + "name": "Weather Description day 1", + "type": "string", + "read": true, + "write": false, + "role": "weather.state.forecast.0" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155036, + "_id": "accuweather.0.Summary.WeatherText_d1" + }, + "accuweather.0.Summary.WeatherText_d2": { + "type": "state", + "common": { + "name": "Weather Description day 2", + "type": "string", + "read": true, + "write": false, + "role": "weather.state.forecast.1" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.WeatherText_d2" + }, + "accuweather.0.Summary.WeatherText_d3": { + "type": "state", + "common": { + "name": "Weather Description day 3", + "type": "string", + "read": true, + "write": false, + "role": "weather.state.forecast.2" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.WeatherText_d3" + }, + "accuweather.0.Summary.WeatherText_d4": { + "type": "state", + "common": { + "name": "Weather Description day 4", + "type": "string", + "read": true, + "write": false, + "role": "weather.state.forecast.3" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.WeatherText_d4" + }, + "accuweather.0.Summary.WeatherText_d5": { + "type": "state", + "common": { + "name": "Weather Description day 5", + "type": "string", + "read": true, + "write": false, + "role": "weather.state.forecast.4" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.WeatherText_d5" + }, + "accuweather.0.Summary.WindDirection": { + "type": "state", + "common": { + "name": "Wind Direction", + "type": "number", + "read": true, + "write": false, + "role": "value.direction.wind.forecast.0", + "unit": "°" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155035, + "_id": "accuweather.0.Summary.WindDirection" + }, + "accuweather.0.Summary.WindDirectionStr": { + "type": "state", + "common": { + "name": "Wind Direction", + "type": "string", + "read": true, + "write": false, + "role": "weather.direction.wind.forecast.0", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155035, + "_id": "accuweather.0.Summary.WindDirectionStr" + }, + "accuweather.0.Summary.WindDirectionStr_d1": { + "type": "state", + "common": { + "name": "Wind Direction day 1", + "type": "string", + "read": true, + "write": false, + "role": "weather.direction.wind.forecast.0", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155037, + "_id": "accuweather.0.Summary.WindDirectionStr_d1" + }, + "accuweather.0.Summary.WindDirectionStr_d2": { + "type": "state", + "common": { + "name": "Wind Direction day 2", + "type": "string", + "read": true, + "write": false, + "role": "weather.direction.wind.forecast.1", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.WindDirectionStr_d2" + }, + "accuweather.0.Summary.WindDirectionStr_d3": { + "type": "state", + "common": { + "name": "Wind Direction day 3", + "type": "string", + "read": true, + "write": false, + "role": "weather.direction.wind.forecast.2", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.WindDirectionStr_d3" + }, + "accuweather.0.Summary.WindDirectionStr_d4": { + "type": "state", + "common": { + "name": "Wind Direction day 4", + "type": "string", + "read": true, + "write": false, + "role": "weather.direction.wind.forecast.3", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.WindDirectionStr_d4" + }, + "accuweather.0.Summary.WindDirectionStr_d5": { + "type": "state", + "common": { + "name": "Wind Direction day 5", + "type": "string", + "read": true, + "write": false, + "role": "weather.direction.wind.forecast.4", + "unit": "" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.WindDirectionStr_d5" + }, + "accuweather.0.Summary.WindDirection_d2": { + "type": "state", + "common": { + "name": "Wind Direction day 2", + "type": "number", + "read": true, + "write": false, + "role": "value.direction.wind.forecast.1", + "unit": "°" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.WindDirection_d2" + }, + "accuweather.0.Summary.WindDirection_d3": { + "type": "state", + "common": { + "name": "Wind Direction day 3", + "type": "number", + "read": true, + "write": false, + "role": "value.direction.wind.forecast.2", + "unit": "°" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.WindDirection_d3" + }, + "accuweather.0.Summary.WindDirection_d4": { + "type": "state", + "common": { + "name": "Wind Direction day 4", + "type": "number", + "read": true, + "write": false, + "role": "value.direction.wind.forecast.3", + "unit": "°" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.WindDirection_d4" + }, + "accuweather.0.Summary.WindDirection_d5": { + "type": "state", + "common": { + "name": "Wind Direction day 5", + "type": "number", + "read": true, + "write": false, + "role": "value.direction.wind.forecast.4", + "unit": "°" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.WindDirection_d5" + }, + "accuweather.0.Summary.WindSpeed": { + "type": "state", + "common": { + "name": "Wind Speed", + "type": "number", + "read": true, + "write": false, + "role": "value.speed.wind.forecast.0", + "unit": "km/h" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155035, + "_id": "accuweather.0.Summary.WindSpeed" + }, + "accuweather.0.Summary.WindSpeed_d2": { + "type": "state", + "common": { + "name": "Wind Speed day 2", + "type": "number", + "read": true, + "write": false, + "role": "value.speed.wind.forecast.1", + "unit": "km/h" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155038, + "_id": "accuweather.0.Summary.WindSpeed_d2" + }, + "accuweather.0.Summary.WindSpeed_d3": { + "type": "state", + "common": { + "name": "Wind Speed day 3", + "type": "number", + "read": true, + "write": false, + "role": "value.speed.wind.forecast.2", + "unit": "km/h" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155039, + "_id": "accuweather.0.Summary.WindSpeed_d3" + }, + "accuweather.0.Summary.WindSpeed_d4": { + "type": "state", + "common": { + "name": "Wind Speed day 4", + "type": "number", + "read": true, + "write": false, + "role": "value.speed.wind.forecast.3", + "unit": "km/h" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155040, + "_id": "accuweather.0.Summary.WindSpeed_d4" + }, + "accuweather.0.Summary.WindSpeed_d5": { + "type": "state", + "common": { + "name": "Wind Speed day 5", + "type": "number", + "read": true, + "write": false, + "role": "value.speed.wind.forecast.4", + "unit": "km/h" + }, + "native": {}, + "from": "system.adapter.accuweather.0", + "user": "system.user.admin", + "ts": 1625222155041, + "_id": "accuweather.0.Summary.WindSpeed_d5" + } +} diff --git a/test/testData/weather_daswetter.json b/test/testData/weather_daswetter.json new file mode 100644 index 000000000..f813ed127 --- /dev/null +++ b/test/testData/weather_daswetter.json @@ -0,0 +1,2124 @@ +{ + "daswetter.0.NextDays.Location_1": { + "type": "device", + "common": { + "name": "Location Name", + "role": "weather" + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424672, + "_id": "daswetter.0.NextDays.Location_1", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1": { + "type": "channel", + "common": { + "name": "Day 1", + "role": "weather" + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424673, + "_id": "daswetter.0.NextDays.Location_1.Day_1", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Maximale_Temperatur_value": { + "type": "state", + "common": { + "name": "Maximal day temperature", + "type": "number", + "role": "value.temperature.max.forecast.0", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424677, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Maximale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Minimale_Temperatur_value": { + "type": "state", + "common": { + "name": "Minimal day temperature", + "type": "number", + "role": "value.temperature.min.forecast.0", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424675, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Minimale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Tag_value": { + "type": "state", + "common": { + "name": "Day name", + "type": "string", + "role": "dayofweek.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424695, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Tag_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Wetter_Symbol_id": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424692, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Wetter_Symbol_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Wetter_Symbol_id2": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424691, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Wetter_Symbol_id2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Wetter_Symbol_value": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424689, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Wetter_Symbol_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Wetter_Symbol_value2": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424688, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Wetter_Symbol_value2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Wetterbedingungen_value": { + "type": "state", + "common": { + "name": "Weather description", + "type": "string", + "role": "weather.state.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424697, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Wetterbedingungen_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Wind_id": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424684, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Wind_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Wind_idB": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424682, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Wind_idB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Wind_value": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424680, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Wind_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.Wind_valueB": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424679, + "_id": "daswetter.0.NextDays.Location_1.Day_1.Wind_valueB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.iconURL": { + "type": "state", + "common": { + "name": "Weather icon URL", + "type": "string", + "role": "weather.icon.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424694, + "_id": "daswetter.0.NextDays.Location_1.Day_1.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_1.windIconURL": { + "type": "state", + "common": { + "name": "Wind icon URL", + "type": "string", + "role": "weather.icon.wind.forecast.0", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424686, + "_id": "daswetter.0.NextDays.Location_1.Day_1.windIconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2": { + "type": "channel", + "common": { + "name": "Day 2", + "role": "weather" + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424698, + "_id": "daswetter.0.NextDays.Location_1.Day_2", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Maximale_Temperatur_value": { + "type": "state", + "common": { + "name": "Maximal day temperature", + "type": "number", + "role": "value.temperature.max.forecast.1", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424700, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Maximale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Minimale_Temperatur_value": { + "type": "state", + "common": { + "name": "Minimal day temperature", + "type": "number", + "role": "value.temperature.min.forecast.1", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424698, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Minimale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Tag_value": { + "type": "state", + "common": { + "name": "Day name", + "type": "string", + "role": "dayofweek.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424718, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Tag_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Wetter_Symbol_id": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424715, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Wetter_Symbol_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Wetter_Symbol_id2": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424713, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Wetter_Symbol_id2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Wetter_Symbol_value": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424712, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Wetter_Symbol_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Wetter_Symbol_value2": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424710, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Wetter_Symbol_value2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Wetterbedingungen_value": { + "type": "state", + "common": { + "name": "Weather description", + "type": "string", + "role": "weather.state.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424720, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Wetterbedingungen_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Wind_id": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424707, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Wind_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Wind_idB": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424705, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Wind_idB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Wind_value": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424704, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Wind_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.Wind_valueB": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424702, + "_id": "daswetter.0.NextDays.Location_1.Day_2.Wind_valueB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.iconURL": { + "type": "state", + "common": { + "name": "Weather icon URL", + "type": "string", + "role": "weather.icon.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424717, + "_id": "daswetter.0.NextDays.Location_1.Day_2.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_2.windIconURL": { + "type": "state", + "common": { + "name": "Wind icon URL", + "type": "string", + "role": "weather.icon.wind.forecast.1", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424709, + "_id": "daswetter.0.NextDays.Location_1.Day_2.windIconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3": { + "type": "channel", + "common": { + "name": "Day 3", + "role": "weather" + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424721, + "_id": "daswetter.0.NextDays.Location_1.Day_3", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Maximale_Temperatur_value": { + "type": "state", + "common": { + "name": "Maximal day temperature", + "type": "number", + "role": "value.temperature.max.forecast.2", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424725, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Maximale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Minimale_Temperatur_value": { + "type": "state", + "common": { + "name": "Minimal day temperature", + "type": "number", + "role": "value.temperature.min.forecast.2", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424722, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Minimale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Tag_value": { + "type": "state", + "common": { + "name": "Day name", + "type": "string", + "role": "dayofweek.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424745, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Tag_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Wetter_Symbol_id": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424742, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Wetter_Symbol_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Wetter_Symbol_id2": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424741, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Wetter_Symbol_id2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Wetter_Symbol_value": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424739, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Wetter_Symbol_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Wetter_Symbol_value2": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424737, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Wetter_Symbol_value2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Wetterbedingungen_value": { + "type": "state", + "common": { + "name": "Weather description", + "type": "string", + "role": "weather.state.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424746, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Wetterbedingungen_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Wind_id": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424732, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Wind_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Wind_idB": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424730, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Wind_idB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Wind_value": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424728, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Wind_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.Wind_valueB": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424726, + "_id": "daswetter.0.NextDays.Location_1.Day_3.Wind_valueB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.iconURL": { + "type": "state", + "common": { + "name": "Weather icon URL", + "type": "string", + "role": "weather.icon.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424743, + "_id": "daswetter.0.NextDays.Location_1.Day_3.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_3.windIconURL": { + "type": "state", + "common": { + "name": "Wind icon URL", + "type": "string", + "role": "weather.icon.wind.forecast.2", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424735, + "_id": "daswetter.0.NextDays.Location_1.Day_3.windIconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4": { + "type": "channel", + "common": { + "name": "Day 4", + "role": "weather" + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424747, + "_id": "daswetter.0.NextDays.Location_1.Day_4", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Maximale_Temperatur_value": { + "type": "state", + "common": { + "name": "Maximal day temperature", + "type": "number", + "role": "value.temperature.max.forecast.3", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424750, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Maximale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Minimale_Temperatur_value": { + "type": "state", + "common": { + "name": "Minimal day temperature", + "type": "number", + "role": "value.temperature.min.forecast.3", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424748, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Minimale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Tag_value": { + "type": "state", + "common": { + "name": "Day name", + "type": "string", + "role": "dayofweek.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424768, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Tag_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Wetter_Symbol_id": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424765, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Wetter_Symbol_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Wetter_Symbol_id2": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424764, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Wetter_Symbol_id2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Wetter_Symbol_value": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424762, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Wetter_Symbol_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Wetter_Symbol_value2": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424761, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Wetter_Symbol_value2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Wetterbedingungen_value": { + "type": "state", + "common": { + "name": "Weather description", + "type": "string", + "role": "weather.state.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424772, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Wetterbedingungen_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Wind_id": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424759, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Wind_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Wind_idB": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424757, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Wind_idB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Wind_value": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424753, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Wind_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.Wind_valueB": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424751, + "_id": "daswetter.0.NextDays.Location_1.Day_4.Wind_valueB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.iconURL": { + "type": "state", + "common": { + "name": "Weather icon URL", + "type": "string", + "role": "weather.icon.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424766, + "_id": "daswetter.0.NextDays.Location_1.Day_4.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_4.windIconURL": { + "type": "state", + "common": { + "name": "Wind icon URL", + "type": "string", + "role": "weather.icon.wind.forecast.3", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424760, + "_id": "daswetter.0.NextDays.Location_1.Day_4.windIconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5": { + "type": "channel", + "common": { + "name": "Day 5", + "role": "weather" + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424773, + "_id": "daswetter.0.NextDays.Location_1.Day_5", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Maximale_Temperatur_value": { + "type": "state", + "common": { + "name": "Maximal day temperature", + "type": "number", + "role": "value.temperature.max.forecast.4", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424777, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Maximale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Minimale_Temperatur_value": { + "type": "state", + "common": { + "name": "Minimal day temperature", + "type": "number", + "role": "value.temperature.min.forecast.4", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424774, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Minimale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Tag_value": { + "type": "state", + "common": { + "name": "Day name", + "type": "string", + "role": "dayofweek.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424795, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Tag_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Wetter_Symbol_id": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424791, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Wetter_Symbol_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Wetter_Symbol_id2": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424789, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Wetter_Symbol_id2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Wetter_Symbol_value": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424787, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Wetter_Symbol_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Wetter_Symbol_value2": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424785, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Wetter_Symbol_value2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Wetterbedingungen_value": { + "type": "state", + "common": { + "name": "Weather description", + "type": "string", + "role": "weather.state.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424797, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Wetterbedingungen_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Wind_id": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424782, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Wind_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Wind_idB": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424781, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Wind_idB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Wind_value": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424779, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Wind_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.Wind_valueB": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424778, + "_id": "daswetter.0.NextDays.Location_1.Day_5.Wind_valueB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.iconURL": { + "type": "state", + "common": { + "name": "Weather icon URL", + "type": "string", + "role": "weather.icon.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424794, + "_id": "daswetter.0.NextDays.Location_1.Day_5.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_5.windIconURL": { + "type": "state", + "common": { + "name": "Wind icon URL", + "type": "string", + "role": "weather.icon.wind.forecast.4", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424784, + "_id": "daswetter.0.NextDays.Location_1.Day_5.windIconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6": { + "type": "channel", + "common": { + "name": "Day 6", + "role": "weather" + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424799, + "_id": "daswetter.0.NextDays.Location_1.Day_6", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Maximale_Temperatur_value": { + "type": "state", + "common": { + "name": "Maximal day temperature", + "type": "number", + "role": "value.temperature.max.forecast.5", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424802, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Maximale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Minimale_Temperatur_value": { + "type": "state", + "common": { + "name": "Minimal day temperature", + "type": "number", + "role": "value.temperature.min.forecast.5", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424800, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Minimale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Tag_value": { + "type": "state", + "common": { + "name": "Day name", + "type": "string", + "role": "dayofweek.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424820, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Tag_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Wetter_Symbol_id": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424815, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Wetter_Symbol_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Wetter_Symbol_id2": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424814, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Wetter_Symbol_id2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Wetter_Symbol_value": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424812, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Wetter_Symbol_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Wetter_Symbol_value2": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424810, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Wetter_Symbol_value2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Wetterbedingungen_value": { + "type": "state", + "common": { + "name": "Weather description", + "type": "string", + "role": "weather.state.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424822, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Wetterbedingungen_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Wind_id": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424807, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Wind_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Wind_idB": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424806, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Wind_idB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Wind_value": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424804, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Wind_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.Wind_valueB": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424803, + "_id": "daswetter.0.NextDays.Location_1.Day_6.Wind_valueB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.iconURL": { + "type": "state", + "common": { + "name": "Weather icon URL", + "type": "string", + "role": "weather.icon.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424817, + "_id": "daswetter.0.NextDays.Location_1.Day_6.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_6.windIconURL": { + "type": "state", + "common": { + "name": "Wind icon URL", + "type": "string", + "role": "weather.icon.wind.forecast.5", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424809, + "_id": "daswetter.0.NextDays.Location_1.Day_6.windIconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7": { + "type": "channel", + "common": { + "name": "Day 7", + "role": "weather" + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424824, + "_id": "daswetter.0.NextDays.Location_1.Day_7", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Maximale_Temperatur_value": { + "type": "state", + "common": { + "name": "Maximal day temperature", + "type": "number", + "role": "value.temperature.max.forecast.6", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424826, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Maximale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Minimale_Temperatur_value": { + "type": "state", + "common": { + "name": "Minimal day temperature", + "type": "number", + "role": "value.temperature.min.forecast.6", + "unit": "°C", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424824, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Minimale_Temperatur_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Tag_value": { + "type": "state", + "common": { + "name": "Day name", + "type": "string", + "role": "dayofweek.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424844, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Tag_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Wetter_Symbol_id": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424841, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Wetter_Symbol_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Wetter_Symbol_id2": { + "type": "state", + "common": { + "name": "Weather icon name", + "type": "number", + "role": "weather.icon.name.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424840, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Wetter_Symbol_id2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Wetter_Symbol_value": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424837, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Wetter_Symbol_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Wetter_Symbol_value2": { + "type": "state", + "common": { + "name": "Weather state URL", + "type": "string", + "role": "weather.title.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424835, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Wetter_Symbol_value2", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Wetterbedingungen_value": { + "type": "state", + "common": { + "name": "Weather description", + "type": "string", + "role": "weather.state.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424846, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Wetterbedingungen_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Wind_id": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424833, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Wind_id", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Wind_idB": { + "type": "state", + "common": { + "name": "Wind id", + "type": "string", + "role": "weather.direction.wind.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424831, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Wind_idB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Wind_value": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424830, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Wind_value", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.Wind_valueB": { + "type": "state", + "common": { + "name": "Wind description", + "type": "string", + "role": "weather.direction.wind.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424828, + "_id": "daswetter.0.NextDays.Location_1.Day_7.Wind_valueB", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.iconURL": { + "type": "state", + "common": { + "name": "Weather icon URL", + "type": "string", + "role": "weather.icon.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424843, + "_id": "daswetter.0.NextDays.Location_1.Day_7.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Day_7.windIconURL": { + "type": "state", + "common": { + "name": "Wind icon URL", + "type": "string", + "role": "weather.icon.wind.forecast.6", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424834, + "_id": "daswetter.0.NextDays.Location_1.Day_7.windIconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "daswetter.0.NextDays.Location_1.Location": { + "type": "state", + "common": { + "name": "Location", + "type": "string", + "role": "location", + "read": true, + "write": false + }, + "from": "system.adapter.daswetter.0", + "user": "system.user.admin", + "ts": 1625142424669, + "_id": "daswetter.0.NextDays.Location_1.Location", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + } +} diff --git a/test/testData/weather_weatherunderground.json b/test/testData/weather_weatherunderground.json new file mode 100644 index 000000000..4c8e1cc70 --- /dev/null +++ b/test/testData/weather_weatherunderground.json @@ -0,0 +1,2861 @@ +{ + "weatherunderground.0.forecast": { + "type": "device", + "role": "forecast", + "common": { + "name": "Forecast for next 4 days days and current conditions" + }, + "native": { + "location": "Bonn" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451296, + "_id": "weatherunderground.0.forecast", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d": { + "type": "channel", + "role": "forecast", + "common": { + "name": "in 0days" + }, + "native": { + "location": "Bonn" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451333, + "_id": "weatherunderground.0.forecast.0d", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.date": { + "type": "state", + "common": { + "name": "forecast for", + "type": "string", + "role": "date.forecast.0", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.date" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451333, + "_id": "weatherunderground.0.forecast.0d.date", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.humidity": { + "type": "state", + "common": { + "name": "average humidity", + "role": "value.humidity.forecast.0", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.avehumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451351, + "_id": "weatherunderground.0.forecast.0d.humidity", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.humidityMax": { + "type": "state", + "common": { + "name": "maximum humidity", + "role": "value.humidity.max.forecast.0", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.maxhumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451352, + "_id": "weatherunderground.0.forecast.0d.humidityMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.humidityMin": { + "type": "state", + "common": { + "name": "minimum humidity", + "role": "value.humidity.min.forecast.0", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.minhumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451353, + "_id": "weatherunderground.0.forecast.0d.humidityMin", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.icon": { + "type": "state", + "common": { + "name": "forecast icon", + "type": "number", + "role": "weather.icon.name.forecast.0", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.icon" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451342, + "_id": "weatherunderground.0.forecast.0d.icon", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.iconURL": { + "type": "state", + "common": { + "name": "forecast icon url", + "type": "string", + "role": "weather.icon.forecast.0", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.icon_url" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451344, + "_id": "weatherunderground.0.forecast.0d.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.precipitationAllDay": { + "type": "state", + "common": { + "name": "Quantitative precipitation all day forecast", + "role": "value.precipitation.today.forecast.0", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.qpf_allday.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451336, + "_id": "weatherunderground.0.forecast.0d.precipitationAllDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.precipitationChance": { + "type": "state", + "common": { + "name": "Percentage of precipitation", + "type": "number", + "role": "value.precipitation.forecast.0", + "unit": "%", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.pop" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451345, + "_id": "weatherunderground.0.forecast.0d.precipitationChance", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.precipitationDay": { + "type": "state", + "common": { + "name": "Quantitative precipitation day forecast", + "role": "value.precipitation.day.forecast.0", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.qpf_day.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451337, + "_id": "weatherunderground.0.forecast.0d.precipitationDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.precipitationNight": { + "type": "state", + "common": { + "name": "Quantitative precipitation night forecast", + "role": "value.precipitation.night.forecast.0", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.qpf_night.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451338, + "_id": "weatherunderground.0.forecast.0d.precipitationNight", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.snowAllDay": { + "type": "state", + "common": { + "name": "Quantitative snow all day forecast", + "type": "number", + "role": "value.snow.forecast.0", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.snow_allday.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451338, + "_id": "weatherunderground.0.forecast.0d.snowAllDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.snowDay": { + "type": "state", + "common": { + "name": "Quantitative snow day forecast", + "role": "value.snow.day.forecast.0", + "type": "number", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.snow_day.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451339, + "_id": "weatherunderground.0.forecast.0d.snowDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.snowNight": { + "type": "state", + "common": { + "name": "Quantitative snow night forecast", + "role": "value.snow.night.forecast.0", + "type": "number", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.snow_night.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451340, + "_id": "weatherunderground.0.forecast.0d.snowNight", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.state": { + "type": "state", + "common": { + "name": "forecast state", + "type": "string", + "role": "weather.state.forecast.0", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.state" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451344, + "_id": "weatherunderground.0.forecast.0d.state", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.tempMax": { + "type": "state", + "common": { + "name": "high temperature", + "type": "number", + "unit": "°C", + "role": "value.temperature.max.forecast.0", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.high.celsius" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451334, + "_id": "weatherunderground.0.forecast.0d.tempMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.tempMin": { + "type": "state", + "common": { + "name": "low temperature", + "type": "number", + "unit": "°C", + "role": "value.temperature.min.forecast.0", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.low.celsius" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451335, + "_id": "weatherunderground.0.forecast.0d.tempMin", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.windDegrees": { + "type": "state", + "common": { + "name": "average wind direction degrees", + "role": "value.direction.wind.forecast.0", + "unit": "°", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.avewind.degrees" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451350, + "_id": "weatherunderground.0.forecast.0d.windDegrees", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.windDegreesMax": { + "type": "state", + "common": { + "name": "max. wind direction", + "role": "value.direction.max.wind.forecast.0", + "unit": "°", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.maxwind.degrees" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451348, + "_id": "weatherunderground.0.forecast.0d.windDegreesMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.windDirection": { + "type": "state", + "common": { + "name": "average wind direction", + "role": "weather.direction.wind.forecast.0", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.avewind.dir" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451349, + "_id": "weatherunderground.0.forecast.0d.windDirection", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.windDirectionMax": { + "type": "state", + "common": { + "name": "max. wind direction", + "role": "weather.direction.max.wind.forecast.0", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.maxwind.dir" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451346, + "_id": "weatherunderground.0.forecast.0d.windDirectionMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.windSpeed": { + "type": "state", + "common": { + "name": "average wind speed", + "role": "value.speed.wind.forecast.0", + "unit": "km/h", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.avewind.kph" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451341, + "_id": "weatherunderground.0.forecast.0d.windSpeed", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.0d.windSpeedMax": { + "type": "state", + "common": { + "name": "max. wind speed", + "role": "value.speed.max.wind.forecast.0", + "unit": "km/h", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.0d.maxwind.kph" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451341, + "_id": "weatherunderground.0.forecast.0d.windSpeedMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d": { + "type": "channel", + "role": "forecast", + "common": { + "name": "in 1days" + }, + "native": { + "location": "Bonn" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451354, + "_id": "weatherunderground.0.forecast.1d", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.date": { + "type": "state", + "common": { + "name": "forecast for", + "type": "string", + "role": "date.forecast.1", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.date" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451355, + "_id": "weatherunderground.0.forecast.1d.date", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.humidity": { + "type": "state", + "common": { + "name": "average humidity", + "role": "value.humidity.forecast.1", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.avehumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451372, + "_id": "weatherunderground.0.forecast.1d.humidity", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.humidityMax": { + "type": "state", + "common": { + "name": "maximum humidity", + "role": "value.humidity.max.forecast.1", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.maxhumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451373, + "_id": "weatherunderground.0.forecast.1d.humidityMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.humidityMin": { + "type": "state", + "common": { + "name": "minimum humidity", + "role": "value.humidity.min.forecast.1", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.minhumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451373, + "_id": "weatherunderground.0.forecast.1d.humidityMin", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.icon": { + "type": "state", + "common": { + "name": "forecast icon", + "type": "number", + "role": "weather.icon.name.forecast.1", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.icon" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451364, + "_id": "weatherunderground.0.forecast.1d.icon", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.iconURL": { + "type": "state", + "common": { + "name": "forecast icon url", + "type": "string", + "role": "weather.icon.forecast.1", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.icon_url" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451366, + "_id": "weatherunderground.0.forecast.1d.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.precipitationAllDay": { + "type": "state", + "common": { + "name": "Quantitative precipitation all day forecast", + "role": "value.precipitation.today.forecast.1", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.qpf_allday.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451357, + "_id": "weatherunderground.0.forecast.1d.precipitationAllDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.precipitationChance": { + "type": "state", + "common": { + "name": "Percentage of precipitation", + "type": "number", + "role": "value.precipitation.forecast.1", + "unit": "%", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.pop" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451367, + "_id": "weatherunderground.0.forecast.1d.precipitationChance", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.precipitationDay": { + "type": "state", + "common": { + "name": "Quantitative precipitation day forecast", + "role": "value.precipitation.day.forecast.1", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.qpf_day.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451357, + "_id": "weatherunderground.0.forecast.1d.precipitationDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.precipitationNight": { + "type": "state", + "common": { + "name": "Quantitative precipitation night forecast", + "role": "value.precipitation.night.forecast.1", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.qpf_night.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451358, + "_id": "weatherunderground.0.forecast.1d.precipitationNight", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.snowAllDay": { + "type": "state", + "common": { + "name": "Quantitative snow all day forecast", + "type": "number", + "role": "value.snow.forecast.1", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.snow_allday.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451359, + "_id": "weatherunderground.0.forecast.1d.snowAllDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.snowDay": { + "type": "state", + "common": { + "name": "Quantitative snow day forecast", + "role": "value.snow.day.forecast.1", + "type": "number", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.snow_day.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451359, + "_id": "weatherunderground.0.forecast.1d.snowDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.snowNight": { + "type": "state", + "common": { + "name": "Quantitative snow night forecast", + "role": "value.snow.night.forecast.1", + "type": "number", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.snow_night.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451360, + "_id": "weatherunderground.0.forecast.1d.snowNight", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.state": { + "type": "state", + "common": { + "name": "forecast state", + "type": "string", + "role": "weather.state.forecast.1", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.state" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451365, + "_id": "weatherunderground.0.forecast.1d.state", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.tempMax": { + "type": "state", + "common": { + "name": "high temperature", + "type": "number", + "unit": "°C", + "role": "value.temperature.max.forecast.1", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.high.celsius" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451356, + "_id": "weatherunderground.0.forecast.1d.tempMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.tempMin": { + "type": "state", + "common": { + "name": "low temperature", + "type": "number", + "unit": "°C", + "role": "value.temperature.min.forecast.1", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.low.celsius" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451356, + "_id": "weatherunderground.0.forecast.1d.tempMin", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.windDegrees": { + "type": "state", + "common": { + "name": "average wind direction degrees", + "role": "value.direction.wind.forecast.1", + "unit": "°", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.avewind.degrees" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451371, + "_id": "weatherunderground.0.forecast.1d.windDegrees", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.windDegreesMax": { + "type": "state", + "common": { + "name": "max. wind direction", + "role": "value.direction.max.wind.forecast.1", + "unit": "°", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.maxwind.degrees" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451369, + "_id": "weatherunderground.0.forecast.1d.windDegreesMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.windDirection": { + "type": "state", + "common": { + "name": "average wind direction", + "role": "weather.direction.wind.forecast.1", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.avewind.dir" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451370, + "_id": "weatherunderground.0.forecast.1d.windDirection", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.windDirectionMax": { + "type": "state", + "common": { + "name": "max. wind direction", + "role": "weather.direction.max.wind.forecast.1", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.maxwind.dir" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451368, + "_id": "weatherunderground.0.forecast.1d.windDirectionMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.windSpeed": { + "type": "state", + "common": { + "name": "average wind speed", + "role": "value.speed.wind.forecast.1", + "unit": "km/h", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.avewind.kph" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451362, + "_id": "weatherunderground.0.forecast.1d.windSpeed", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.1d.windSpeedMax": { + "type": "state", + "common": { + "name": "max. wind speed", + "role": "value.speed.max.wind.forecast.1", + "unit": "km/h", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.1d.maxwind.kph" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451360, + "_id": "weatherunderground.0.forecast.1d.windSpeedMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d": { + "type": "channel", + "role": "forecast", + "common": { + "name": "in 2days" + }, + "native": { + "location": "Bonn" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451374, + "_id": "weatherunderground.0.forecast.2d", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.date": { + "type": "state", + "common": { + "name": "forecast for", + "type": "string", + "role": "date.forecast.2", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.date" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451375, + "_id": "weatherunderground.0.forecast.2d.date", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.humidity": { + "type": "state", + "common": { + "name": "average humidity", + "role": "value.humidity.forecast.2", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.avehumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451396, + "_id": "weatherunderground.0.forecast.2d.humidity", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.humidityMax": { + "type": "state", + "common": { + "name": "maximum humidity", + "role": "value.humidity.max.forecast.2", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.maxhumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451397, + "_id": "weatherunderground.0.forecast.2d.humidityMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.humidityMin": { + "type": "state", + "common": { + "name": "minimum humidity", + "role": "value.humidity.min.forecast.2", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.minhumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451398, + "_id": "weatherunderground.0.forecast.2d.humidityMin", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.icon": { + "type": "state", + "common": { + "name": "forecast icon", + "type": "number", + "role": "weather.icon.name.forecast.2", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.icon" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451387, + "_id": "weatherunderground.0.forecast.2d.icon", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.iconURL": { + "type": "state", + "common": { + "name": "forecast icon url", + "type": "string", + "role": "weather.icon.forecast.2", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.icon_url" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451389, + "_id": "weatherunderground.0.forecast.2d.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.precipitationAllDay": { + "type": "state", + "common": { + "name": "Quantitative precipitation all day forecast", + "role": "value.precipitation.today.forecast.2", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.qpf_allday.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451378, + "_id": "weatherunderground.0.forecast.2d.precipitationAllDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.precipitationChance": { + "type": "state", + "common": { + "name": "Percentage of precipitation", + "type": "number", + "role": "value.precipitation.forecast.2", + "unit": "%", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.pop" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451390, + "_id": "weatherunderground.0.forecast.2d.precipitationChance", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.precipitationDay": { + "type": "state", + "common": { + "name": "Quantitative precipitation day forecast", + "role": "value.precipitation.day.forecast.2", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.qpf_day.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451379, + "_id": "weatherunderground.0.forecast.2d.precipitationDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.precipitationNight": { + "type": "state", + "common": { + "name": "Quantitative precipitation night forecast", + "role": "value.precipitation.night.forecast.2", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.qpf_night.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451380, + "_id": "weatherunderground.0.forecast.2d.precipitationNight", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.snowAllDay": { + "type": "state", + "common": { + "name": "Quantitative snow all day forecast", + "type": "number", + "role": "value.snow.forecast.2", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.snow_allday.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451381, + "_id": "weatherunderground.0.forecast.2d.snowAllDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.snowDay": { + "type": "state", + "common": { + "name": "Quantitative snow day forecast", + "role": "value.snow.day.forecast.2", + "type": "number", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.snow_day.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451382, + "_id": "weatherunderground.0.forecast.2d.snowDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.snowNight": { + "type": "state", + "common": { + "name": "Quantitative snow night forecast", + "role": "value.snow.night.forecast.2", + "type": "number", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.snow_night.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451384, + "_id": "weatherunderground.0.forecast.2d.snowNight", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.state": { + "type": "state", + "common": { + "name": "forecast state", + "type": "string", + "role": "weather.state.forecast.2", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.state" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451388, + "_id": "weatherunderground.0.forecast.2d.state", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.tempMax": { + "type": "state", + "common": { + "name": "high temperature", + "type": "number", + "unit": "°C", + "role": "value.temperature.max.forecast.2", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.high.celsius" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451375, + "_id": "weatherunderground.0.forecast.2d.tempMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.tempMin": { + "type": "state", + "common": { + "name": "low temperature", + "type": "number", + "unit": "°C", + "role": "value.temperature.min.forecast.2", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.low.celsius" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451376, + "_id": "weatherunderground.0.forecast.2d.tempMin", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.windDegrees": { + "type": "state", + "common": { + "name": "average wind direction degrees", + "role": "value.direction.wind.forecast.2", + "unit": "°", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.avewind.degrees" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451394, + "_id": "weatherunderground.0.forecast.2d.windDegrees", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.windDegreesMax": { + "type": "state", + "common": { + "name": "max. wind direction", + "role": "value.direction.max.wind.forecast.2", + "unit": "°", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.maxwind.degrees" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451392, + "_id": "weatherunderground.0.forecast.2d.windDegreesMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.windDirection": { + "type": "state", + "common": { + "name": "average wind direction", + "role": "weather.direction.wind.forecast.2", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.avewind.dir" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451393, + "_id": "weatherunderground.0.forecast.2d.windDirection", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.windDirectionMax": { + "type": "state", + "common": { + "name": "max. wind direction", + "role": "weather.direction.max.wind.forecast.2", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.maxwind.dir" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451391, + "_id": "weatherunderground.0.forecast.2d.windDirectionMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.windSpeed": { + "type": "state", + "common": { + "name": "average wind speed", + "role": "value.speed.wind.forecast.2", + "unit": "km/h", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.avewind.kph" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451386, + "_id": "weatherunderground.0.forecast.2d.windSpeed", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.2d.windSpeedMax": { + "type": "state", + "common": { + "name": "max. wind speed", + "role": "value.speed.max.wind.forecast.2", + "unit": "km/h", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.2d.maxwind.kph" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451384, + "_id": "weatherunderground.0.forecast.2d.windSpeedMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d": { + "type": "channel", + "role": "forecast", + "common": { + "name": "in 3days" + }, + "native": { + "location": "Bonn" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451399, + "_id": "weatherunderground.0.forecast.3d", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.date": { + "type": "state", + "common": { + "name": "forecast for", + "type": "string", + "role": "date.forecast.3", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.date" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451400, + "_id": "weatherunderground.0.forecast.3d.date", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.humidity": { + "type": "state", + "common": { + "name": "average humidity", + "role": "value.humidity.forecast.3", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.avehumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451416, + "_id": "weatherunderground.0.forecast.3d.humidity", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.humidityMax": { + "type": "state", + "common": { + "name": "maximum humidity", + "role": "value.humidity.max.forecast.3", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.maxhumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451417, + "_id": "weatherunderground.0.forecast.3d.humidityMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.humidityMin": { + "type": "state", + "common": { + "name": "minimum humidity", + "role": "value.humidity.min.forecast.3", + "unit": "%", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.minhumidity" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451417, + "_id": "weatherunderground.0.forecast.3d.humidityMin", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.icon": { + "type": "state", + "common": { + "name": "forecast icon", + "type": "number", + "role": "weather.icon.name.forecast.3", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.icon" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451409, + "_id": "weatherunderground.0.forecast.3d.icon", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.iconURL": { + "type": "state", + "common": { + "name": "forecast icon url", + "type": "string", + "role": "weather.icon.forecast.3", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.icon_url" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451411, + "_id": "weatherunderground.0.forecast.3d.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.precipitationAllDay": { + "type": "state", + "common": { + "name": "Quantitative precipitation all day forecast", + "role": "value.precipitation.today.forecast.3", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.qpf_allday.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451403, + "_id": "weatherunderground.0.forecast.3d.precipitationAllDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.precipitationChance": { + "type": "state", + "common": { + "name": "Percentage of precipitation", + "type": "number", + "role": "value.precipitation.forecast.3", + "unit": "%", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.pop" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451412, + "_id": "weatherunderground.0.forecast.3d.precipitationChance", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.precipitationDay": { + "type": "state", + "common": { + "name": "Quantitative precipitation day forecast", + "role": "value.precipitation.day.forecast.3", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.qpf_day.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451404, + "_id": "weatherunderground.0.forecast.3d.precipitationDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.precipitationNight": { + "type": "state", + "common": { + "name": "Quantitative precipitation night forecast", + "role": "value.precipitation.night.forecast.3", + "unit": "mm", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.qpf_night.mm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451405, + "_id": "weatherunderground.0.forecast.3d.precipitationNight", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.snowAllDay": { + "type": "state", + "common": { + "name": "Quantitative snow all day forecast", + "type": "number", + "role": "value.snow.forecast.3", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.snow_allday.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451406, + "_id": "weatherunderground.0.forecast.3d.snowAllDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.snowDay": { + "type": "state", + "common": { + "name": "Quantitative snow day forecast", + "role": "value.snow.day.forecast.3", + "type": "number", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.snow_day.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451406, + "_id": "weatherunderground.0.forecast.3d.snowDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.snowNight": { + "type": "state", + "common": { + "name": "Quantitative snow night forecast", + "role": "value.snow.night.forecast.3", + "type": "number", + "unit": "cm", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.snow_night.cm" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451407, + "_id": "weatherunderground.0.forecast.3d.snowNight", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.state": { + "type": "state", + "common": { + "name": "forecast state", + "type": "string", + "role": "weather.state.forecast.3", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.state" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451410, + "_id": "weatherunderground.0.forecast.3d.state", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.tempMax": { + "type": "state", + "common": { + "name": "high temperature", + "type": "number", + "unit": "°C", + "role": "value.temperature.max.forecast.3", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.high.celsius" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451401, + "_id": "weatherunderground.0.forecast.3d.tempMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.tempMin": { + "type": "state", + "common": { + "name": "low temperature", + "type": "number", + "unit": "°C", + "role": "value.temperature.min.forecast.3", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.low.celsius" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451402, + "_id": "weatherunderground.0.forecast.3d.tempMin", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.windDegrees": { + "type": "state", + "common": { + "name": "average wind direction degrees", + "role": "value.direction.wind.forecast.3", + "unit": "°", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.avewind.degrees" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451415, + "_id": "weatherunderground.0.forecast.3d.windDegrees", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.windDegreesMax": { + "type": "state", + "common": { + "name": "max. wind direction", + "role": "value.direction.max.wind.forecast.3", + "unit": "°", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.maxwind.degrees" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451413, + "_id": "weatherunderground.0.forecast.3d.windDegreesMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.windDirection": { + "type": "state", + "common": { + "name": "average wind direction", + "role": "weather.direction.wind.forecast.3", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.avewind.dir" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451414, + "_id": "weatherunderground.0.forecast.3d.windDirection", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.windDirectionMax": { + "type": "state", + "common": { + "name": "max. wind direction", + "role": "weather.direction.max.wind.forecast.3", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.maxwind.dir" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451412, + "_id": "weatherunderground.0.forecast.3d.windDirectionMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.windSpeed": { + "type": "state", + "common": { + "name": "average wind speed", + "role": "value.speed.wind.forecast.3", + "unit": "km/h", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.avewind.kph" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451409, + "_id": "weatherunderground.0.forecast.3d.windSpeed", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.3d.windSpeedMax": { + "type": "state", + "common": { + "name": "max. wind speed", + "role": "value.speed.max.wind.forecast.3", + "unit": "km/h", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "forecast.3d.maxwind.kph" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451408, + "_id": "weatherunderground.0.forecast.3d.windSpeedMax", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current": { + "type": "channel", + "common": { + "name": "Current conditions", + "role": "weather" + }, + "native": { + "location": "Bonn" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451299, + "_id": "weatherunderground.0.forecast.current", + "acl": { + "object": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.UV": { + "type": "state", + "common": { + "name": "UV-Index", + "role": "value.uv", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "current.UV" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451321, + "_id": "weatherunderground.0.forecast.current.UV", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.dewPoint": { + "type": "state", + "common": { + "name": "Dewpoint", + "role": "value.temperature.dewpoint", + "type": "number", + "unit": "°C", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.dewpoint_c" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451313, + "_id": "weatherunderground.0.forecast.current.dewPoint", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.displayLocationElevation": { + "type": "state", + "common": { + "name": "Display location elevation", + "role": "value.gps.elevation", + "type": "number", + "unit": "m", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.display_location.elevation" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451303, + "_id": "weatherunderground.0.forecast.current.displayLocationElevation", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.displayLocationFull": { + "type": "state", + "common": { + "name": "Display location full name", + "role": "location", + "type": "string" + }, + "native": { + "id": "current_observation.display_location.full" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451301, + "_id": "weatherunderground.0.forecast.current.displayLocationFull", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.displayLocationLatitude": { + "type": "state", + "common": { + "name": "Display location latitude", + "role": "value.gps.latitude", + "type": "number", + "unit": "°", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.display_location.latitude" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451301, + "_id": "weatherunderground.0.forecast.current.displayLocationLatitude", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.displayLocationLongitude": { + "type": "state", + "common": { + "name": "Display location longitude", + "role": "value.gps.longitude", + "type": "number", + "unit": "°", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.display_location.longitude" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451302, + "_id": "weatherunderground.0.forecast.current.displayLocationLongitude", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.feelsLike": { + "type": "state", + "common": { + "name": "Temperature feels like", + "role": "value.temperature.feelslike", + "type": "number", + "unit": "°C", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.feelslike_c" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451315, + "_id": "weatherunderground.0.forecast.current.feelsLike", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.forecastURL": { + "type": "state", + "common": { + "name": "URL to wu-forecast page", + "role": "weather.chart.url.forecast", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.forecast_url" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451324, + "_id": "weatherunderground.0.forecast.current.forecastURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.historyURL": { + "type": "state", + "common": { + "name": "URL to wu-history page", + "role": "weather.chart.url", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.history_url" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451325, + "_id": "weatherunderground.0.forecast.current.historyURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.iconURL": { + "type": "state", + "common": { + "name": "URL to current weather icon", + "role": "weather.icon", + "type": "number", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.icon_url" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451323, + "_id": "weatherunderground.0.forecast.current.iconURL", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.localTimeRFC822": { + "type": "state", + "common": { + "name": "Local time (rfc822)", + "role": "state", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.local_time_rfc822" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451309, + "_id": "weatherunderground.0.forecast.current.localTimeRFC822", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.observationLocationElevation": { + "type": "state", + "common": { + "name": "Observation location elevation", + "role": "value.gps.elevation", + "type": "number", + "unit": "m", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.observation_location.elevation" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451307, + "_id": "weatherunderground.0.forecast.current.observationLocationElevation", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.observationLocationFull": { + "type": "state", + "common": { + "name": "Observation location full name", + "role": "location", + "type": "string" + }, + "native": { + "id": "current_observation.observation_location.full" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451304, + "_id": "weatherunderground.0.forecast.current.observationLocationFull", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.observationLocationLatitude": { + "type": "state", + "common": { + "name": "Observation location latitude", + "role": "value.gps.latitude", + "type": "number", + "unit": "°", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.observation_location.latitude" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451305, + "_id": "weatherunderground.0.forecast.current.observationLocationLatitude", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.observationLocationLongitude": { + "type": "state", + "common": { + "name": "Observation location longitude", + "role": "value.gps.longitude", + "type": "number", + "unit": "°", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.observation_location.longitude" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451306, + "_id": "weatherunderground.0.forecast.current.observationLocationLongitude", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.observationLocationStationID": { + "type": "state", + "common": { + "name": "WU station ID", + "role": "state", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.observation_location.station_id" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451308, + "_id": "weatherunderground.0.forecast.current.observationLocationStationID", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.observationTime": { + "type": "state", + "common": { + "name": "Observation time (rfc822)", + "role": "date", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.local_epoch" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451311, + "_id": "weatherunderground.0.forecast.current.observationTime", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.observationTimeRFC822": { + "type": "state", + "common": { + "name": "Observation time (rfc822)", + "role": "state", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.observation_time_rfc822" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451310, + "_id": "weatherunderground.0.forecast.current.observationTimeRFC822", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.precipitationDay": { + "type": "state", + "common": { + "name": "Precipitation (today)", + "role": "value.precipitation.today", + "type": "number", + "unit": "mm", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.precip_today_metric" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451323, + "_id": "weatherunderground.0.forecast.current.precipitationDay", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.precipitationHour": { + "type": "state", + "common": { + "name": "Precipitation (last 1h)", + "role": "value.precipitation.hour", + "type": "number", + "unit": "mm", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.precip_1hr_metric" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451322, + "_id": "weatherunderground.0.forecast.current.precipitationHour", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.pressure": { + "type": "state", + "common": { + "name": "Air pressure (mbar)", + "role": "value.pressure", + "type": "number", + "unit": "mbar", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.pressure_mb" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451320, + "_id": "weatherunderground.0.forecast.current.pressure", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.solarRadiation": { + "type": "state", + "common": { + "name": "Solar radiation", + "role": "value.radiation", + "type": "number", + "unit": "w/m2", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.solarradiation" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451321, + "_id": "weatherunderground.0.forecast.current.solarRadiation", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.temp": { + "type": "state", + "common": { + "name": "Temperature", + "role": "value.temperature", + "type": "number", + "unit": "°C", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.temp_c" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451312, + "_id": "weatherunderground.0.forecast.current.temp", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.visibility": { + "type": "state", + "common": { + "name": "Visibility", + "role": "value.distance.visibility", + "type": "number", + "unit": "km", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.visibility_km" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451315, + "_id": "weatherunderground.0.forecast.current.visibility", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.weather": { + "type": "state", + "common": { + "name": "Weather (engl.)", + "role": "weather.state", + "type": "string", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.weather" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451311, + "_id": "weatherunderground.0.forecast.current.weather", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.windChill": { + "type": "state", + "common": { + "name": "Windchill", + "role": "value.temperature.windchill", + "type": "number", + "unit": "°C", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.windchill_c" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451314, + "_id": "weatherunderground.0.forecast.current.windChill", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.windDirection": { + "type": "state", + "common": { + "name": "Wind direction", + "role": "value.direction.wind", + "type": "string", + "unit": "", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.wind_degrees" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451318, + "_id": "weatherunderground.0.forecast.current.windDirection", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + }, + "weatherunderground.0.forecast.current.windGust": { + "type": "state", + "common": { + "name": "Wind gust", + "role": "value.speed.wind.gust", + "type": "number", + "unit": "km/h", + "read": true, + "write": false + }, + "native": { + "id": "current_observation.wind_gust_kph" + }, + "from": "system.adapter.weatherunderground.0", + "user": "system.user.admin", + "ts": 1625152451319, + "_id": "weatherunderground.0.forecast.current.windGust", + "acl": { + "object": 1636, + "state": 1636, + "owner": "system.user.admin", + "ownerGroup": "system.group.administrator" + } + } +} From d310b36ad49407eea3df8e944ef4f3f278ecd5d3 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 12:37:38 +0200 Subject: [PATCH 15/35] add humidity to weather forecast --- lib/converters/weather.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/converters/weather.js b/lib/converters/weather.js index 8e7b713ed..60a0716a3 100644 --- a/lib/converters/weather.js +++ b/lib/converters/weather.js @@ -141,6 +141,17 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, utils.addID2entity(state.id, entity); } + state = control.states.find(s => s.id && s.name === 'HUMIDITY' + day); + if (state && state.id) { + if (!somethingFound) { + hassCounter++; + somethingFound = true; + } + dayShiftId = dayShiftId || state.id; + entity.context.ATTRIBUTES.push({attribute: `forecast.${hassCounter}.humidity`, getId: state.id}); + utils.addID2entity(state.id, entity); + } + if (somethingFound) { state = control.states.find(s => s.id && s.name === 'DATE' + day); if (state && state.id) { From 59bb9af2bc160f607e0943a976de550e6eb2effc Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 13:06:42 +0200 Subject: [PATCH 16/35] add "today" as first forecast in order to get min/max temp and so on --- lib/converters/weather.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/converters/weather.js b/lib/converters/weather.js index 60a0716a3..c36c0bf20 100644 --- a/lib/converters/weather.js +++ b/lib/converters/weather.js @@ -72,10 +72,12 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, let somethingFound; let hassCounter = -1; - for (let day = 1; day < 8; day++) { + for (let day = 0; day < 9; day++) { + //add "today" as forecast 0: + const postFix = day ? String(day) : ''; let dayShiftId; somethingFound = false; - state = control.states.find(s => s.id && s.name === 'ICON' + day); + state = control.states.find(s => s.id && s.name === 'ICON' + postFix); if (state && state.id) { if (!somethingFound) { hassCounter++; @@ -86,7 +88,7 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, utils.addID2entity(state.id, entity); } - state = control.states.find(s => s.id && s.name === 'TEMP' + day); + state = control.states.find(s => s.id && s.name === 'TEMP_MAX' + postFix); if (state && state.id) { if (!somethingFound) { hassCounter++; @@ -96,7 +98,7 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, entity.context.ATTRIBUTES.push({attribute: `forecast.${hassCounter}.temperature`, getId: state.id}); utils.addID2entity(state.id, entity); } else { - state = control.states.find(s => s.id && s.name === 'TEMP_MAX' + day); + state = control.states.find(s => s.id && s.name === 'TEMP' + postFix); if (state && state.id) { if (!somethingFound) { hassCounter++; @@ -108,7 +110,7 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, } } - state = control.states.find(s => s.id && s.name === 'TEMP_MIN' + day); + state = control.states.find(s => s.id && s.name === 'TEMP_MIN' + postFix); if (state && state.id) { if (!somethingFound) { hassCounter++; @@ -119,7 +121,7 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, utils.addID2entity(state.id, entity); } - state = control.states.find(s => s.id && s.name === 'PRECIPITATION_CHANCE' + day); + state = control.states.find(s => s.id && s.name === 'PRECIPITATION_CHANCE' + postFix); if (state && state.id) { if (!somethingFound) { hassCounter++; @@ -130,7 +132,7 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, utils.addID2entity(state.id, entity); } - state = control.states.find(s => s.id && s.name === 'PRECIPITATION' + day); + state = control.states.find(s => s.id && s.name === 'PRECIPITATION' + postFix); if (state && state.id) { if (!somethingFound) { hassCounter++; @@ -141,7 +143,7 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, utils.addID2entity(state.id, entity); } - state = control.states.find(s => s.id && s.name === 'HUMIDITY' + day); + state = control.states.find(s => s.id && s.name === 'HUMIDITY' + postFix); if (state && state.id) { if (!somethingFound) { hassCounter++; @@ -153,7 +155,7 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, } if (somethingFound) { - state = control.states.find(s => s.id && s.name === 'DATE' + day); + state = control.states.find(s => s.id && s.name === 'DATE' + postFix); if (state && state.id) { entity.context.ATTRIBUTES.push({attribute: `forecast.${hassCounter}.datetime`, getId: state.id}); utils.addID2entity(state.id, entity); From 11cd9c6c135d7fbf2d28cad9383c8fb750f21a7e Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 13:06:51 +0200 Subject: [PATCH 17/35] fix weather tests --- .../weather_integration_tests.js | 195 ++++++++++++------ test/testData/weather_weatherunderground.json | 23 --- 2 files changed, 135 insertions(+), 83 deletions(-) diff --git a/test/integrationTests/weather_integration_tests.js b/test/integrationTests/weather_integration_tests.js index 1dee216f9..8ee18cfc3 100644 --- a/test/integrationTests/weather_integration_tests.js +++ b/test/integrationTests/weather_integration_tests.js @@ -53,121 +53,151 @@ exports.runTests = function (getHarness) { updatedValue: 180 }, { attribute: 'forecast.0.condition', + iobId: deviceId + '.WeatherIconURL', + initialValue: 'iconURL', + updatedValue: 'iconURLUpdated' + }, { + attribute: 'forecast.0.temperature', + iobId: deviceId + '.TempMax_d1', + initialValue: 10, + updatedValue: 11 + }, { + attribute: 'forecast.0.templow', + iobId: deviceId + '.TempMin_d1', + initialValue: 8, + updatedValue: 9 + }, { + attribute: 'forecast.0.precipitation_probability', + iobId: deviceId + '.PrecipitationProbability_d1', + initialValue: 50, + updatedValue: 60 + }, { + attribute: 'forecast.0.precipitation', + iobId: deviceId + '.TotalLiquidVolume_d1', + initialValue: 500, + updatedValue: 600 + }, { + attribute: 'forecast.0.datetime', + iobId: deviceId + '.DateTime_d1', + initialValue: 'Do', + updatedValue: 'Fr' + }, { + attribute: 'forecast.1.condition', iobId: deviceId + '.WeatherIconURL_d2', initialValue: 'iconURL1', updatedValue: 'iconURL1Updated' }, { - attribute: 'forecast.0.temperature', + attribute: 'forecast.1.temperature', iobId: deviceId + '.TempMax_d2', initialValue: 10, updatedValue: 11 }, { - attribute: 'forecast.0.templow', + attribute: 'forecast.1.templow', iobId: deviceId + '.TempMin_d2', initialValue: 8, updatedValue: 9 }, { - attribute: 'forecast.0.precipitation_probability', + attribute: 'forecast.1.precipitation_probability', iobId: deviceId + '.PrecipitationProbability_d2', initialValue: 50, updatedValue: 60 }, { - attribute: 'forecast.0.precipitation', + attribute: 'forecast.1.precipitation', iobId: deviceId + '.TotalLiquidVolume_d2', initialValue: 500, updatedValue: 600 }, { - attribute: 'forecast.0.datetime', + attribute: 'forecast.1.datetime', iobId: deviceId + '.DateTime_d2', initialValue: 'Do', updatedValue: 'Fr' }, { - attribute: 'forecast.1.condition', + attribute: 'forecast.2.condition', iobId: deviceId + '.WeatherIconURL_d3', initialValue: 'iconURL2', updatedValue: 'iconURL2Updated' }, { - attribute: 'forecast.1.temperature', + attribute: 'forecast.2.temperature', iobId: deviceId + '.TempMax_d3', initialValue: 12, updatedValue: 13 }, { - attribute: 'forecast.1.templow', + attribute: 'forecast.2.templow', iobId: deviceId + '.TempMin_d3', initialValue: 7, updatedValue: 8 }, { - attribute: 'forecast.1.precipitation_probability', + attribute: 'forecast.2.precipitation_probability', iobId: deviceId + '.PrecipitationProbability_d3', initialValue: 51, updatedValue: 61 }, { - attribute: 'forecast.1.precipitation', + attribute: 'forecast.2.precipitation', iobId: deviceId + '.TotalLiquidVolume_d3', initialValue: 501, updatedValue: 601 }, { - attribute: 'forecast.1.datetime', + attribute: 'forecast.2.datetime', iobId: deviceId + '.DateTime_d3', initialValue: 'Fr', updatedValue: 'Sa' }, { - attribute: 'forecast.2.condition', + attribute: 'forecast.3.condition', iobId: deviceId + '.WeatherIconURL_d4', initialValue: 'iconURL3', updatedValue: 'iconURL3Updated' }, { - attribute: 'forecast.2.temperature', + attribute: 'forecast.3.temperature', iobId: deviceId + '.TempMax_d4', initialValue: 14, updatedValue: 15 }, { - attribute: 'forecast.2.templow', + attribute: 'forecast.3.templow', iobId: deviceId + '.TempMin_d4', initialValue: 4, updatedValue: 5 }, { - attribute: 'forecast.2.precipitation_probability', + attribute: 'forecast.3.precipitation_probability', iobId: deviceId + '.PrecipitationProbability_d4', initialValue: 52, updatedValue: 62 }, { - attribute: 'forecast.2.precipitation', + attribute: 'forecast.3.precipitation', iobId: deviceId + '.TotalLiquidVolume_d4', initialValue: 502, updatedValue: 602 }, { - attribute: 'forecast.2.datetime', + attribute: 'forecast.3.datetime', iobId: deviceId + '.DateTime_d4', initialValue: 'Sa', updatedValue: 'So' }, { - attribute: 'forecast.3.condition', + attribute: 'forecast.4.condition', iobId: deviceId + '.WeatherIconURL_d5', initialValue: 'iconURL4', updatedValue: 'iconURL4Updated' }, { - attribute: 'forecast.3.temperature', + attribute: 'forecast.4.temperature', iobId: deviceId + '.TempMax_d5', initialValue: 20, updatedValue: 21 }, { - attribute: 'forecast.3.templow', + attribute: 'forecast.4.templow', iobId: deviceId + '.TempMin_d5', initialValue: 10, updatedValue: 12 }, { - attribute: 'forecast.3.precipitation_probability', + attribute: 'forecast.4.precipitation_probability', iobId: deviceId + '.PrecipitationProbability_d5', initialValue: 53, updatedValue: 63 }, { - attribute: 'forecast.3.precipitation', + attribute: 'forecast.4.precipitation', iobId: deviceId + '.TotalLiquidVolume_d5', initialValue: 503, updatedValue: 603 }, { - attribute: 'forecast.3.datetime', + attribute: 'forecast.4.datetime', iobId: deviceId + '.DateTime_d5', initialValue: 'So', updatedValue: 'Mo' @@ -203,91 +233,106 @@ exports.runTests = function (getHarness) { updatedValue: 30 }, { attribute: 'forecast.0.condition', + iobId: deviceId + '.Day_1.iconURL', + initialValue: 'iconURL', + updatedValue: 'iconURLUpdated' + }, { + attribute: 'forecast.0.temperature', + iobId: deviceId + '.Day_1.Maximale_Temperatur_value', + initialValue: 25, + updatedValue: 30 + }, { + attribute: 'forecast.0.templow', + iobId: deviceId + '.Day_1.Minimale_Temperatur_value', + initialValue: 7, + updatedValue: 6 + }, { + attribute: 'forecast.1.condition', iobId: deviceId + '.Day_2.iconURL', initialValue: 'iconURL1', updatedValue: 'iconURL1Updated' }, { - attribute: 'forecast.0.temperature', + attribute: 'forecast.1.temperature', iobId: deviceId + '.Day_2.Maximale_Temperatur_value', initialValue: 10, updatedValue: 11 }, { - attribute: 'forecast.0.templow', + attribute: 'forecast.1.templow', iobId: deviceId + '.Day_2.Minimale_Temperatur_value', initialValue: 8, updatedValue: 9 }, { - attribute: 'forecast.1.condition', + attribute: 'forecast.2.condition', iobId: deviceId + '.Day_3.iconURL', initialValue: 'iconURL2', updatedValue: 'iconURL2Updated' }, { - attribute: 'forecast.1.temperature', + attribute: 'forecast.2.temperature', iobId: deviceId + '.Day_3.Maximale_Temperatur_value', initialValue: 12, updatedValue: 13 }, { - attribute: 'forecast.1.templow', + attribute: 'forecast.2.templow', iobId: deviceId + '.Day_3.Minimale_Temperatur_value', initialValue: 7, updatedValue: 8 }, { - attribute: 'forecast.2.condition', + attribute: 'forecast.3.condition', iobId: deviceId + '.Day_4.iconURL', initialValue: 'iconURL3', updatedValue: 'iconURL3Updated' }, { - attribute: 'forecast.2.temperature', + attribute: 'forecast.3.temperature', iobId: deviceId + '.Day_4.Maximale_Temperatur_value', initialValue: 14, updatedValue: 15 }, { - attribute: 'forecast.2.templow', + attribute: 'forecast.3.templow', iobId: deviceId + '.Day_4.Minimale_Temperatur_value', initialValue: 4, updatedValue: 5 }, { - attribute: 'forecast.3.condition', + attribute: 'forecast.4.condition', iobId: deviceId + '.Day_5.iconURL', initialValue: 'iconURL4', updatedValue: 'iconURL4Updated' }, { - attribute: 'forecast.3.temperature', + attribute: 'forecast.4.temperature', iobId: deviceId + '.Day_5.Maximale_Temperatur_value', initialValue: 20, updatedValue: 21 }, { - attribute: 'forecast.3.templow', + attribute: 'forecast.4.templow', iobId: deviceId + '.Day_5.Minimale_Temperatur_value', initialValue: 10, updatedValue: 12 }, { - attribute: 'forecast.4.condition', + attribute: 'forecast.5.condition', iobId: deviceId + '.Day_6.iconURL', initialValue: 'iconURL5', updatedValue: 'iconURL5Updated' }, { - attribute: 'forecast.4.temperature', + attribute: 'forecast.5.temperature', iobId: deviceId + '.Day_6.Maximale_Temperatur_value', initialValue: 30, updatedValue: 31 }, { - attribute: 'forecast.4.templow', + attribute: 'forecast.5.templow', iobId: deviceId + '.Day_6.Minimale_Temperatur_value', initialValue: 13, updatedValue: 14 }, { - attribute: 'forecast.5.condition', + attribute: 'forecast.6.condition', iobId: deviceId + '.Day_7.iconURL', initialValue: 'iconURL6', updatedValue: 'iconURL6Updated' }, { - attribute: 'forecast.5.temperature', + attribute: 'forecast.6.temperature', iobId: deviceId + '.Day_7.Maximale_Temperatur_value', initialValue: 25, updatedValue: 28 }, { - attribute: 'forecast.5.templow', + attribute: 'forecast.6.templow', iobId: deviceId + '.Day_7.Minimale_Temperatur_value', initialValue: 15, updatedValue: 17 @@ -304,13 +349,13 @@ exports.runTests = function (getHarness) { } } - for (let day = 0; day < 6; day += 1) { + for (let day = 0; day < entity.attributes.forecast.length; day += 1) { const forecast = entity.attributes.forecast[day]; expect(forecast).to.have.property('datetime'); const date = new Date(forecast.datetime); expect(date).to.be.ok; const now = new Date(); - expect(date.getDate()).to.equal(now.getDate() + day + 1); + expect(date.getDate()).to.equal(now.getDate() + day); } await testUpdates(harness, states, entity); @@ -319,7 +364,7 @@ exports.runTests = function (getHarness) { await tools.validateStateChange(harness, entity.entity_id, async () => await harness.states.setStateAsync(deviceId + '.Day_7.iconURL', {val: 'icon6URLNeu', ts: newTS, ack: true}), entity => { - const date = new Date(entity.attributes.forecast[5].datetime); + const date = new Date(entity.attributes.forecast[6].datetime); const controlDate = new Date(newTS); expect(date.getDate()).to.equal(controlDate.getDate() +6); }); @@ -362,91 +407,121 @@ exports.runTests = function (getHarness) { updatedValue: 180 }, { attribute: 'forecast.0.condition', + iobId: deviceId + '.0d.iconURL', + initialValue: 'iconURL', + updatedValue: 'iconURLUpdated' + }, { + attribute: 'forecast.0.temperature', + iobId: deviceId + '.0d.tempMax', + initialValue: 9, + updatedValue: 10 + }, { + attribute: 'forecast.0.templow', + iobId: deviceId + '.0d.tempMin', + initialValue: 7, + updatedValue: 8 + }, { + attribute: 'forecast.0.precipitation_probability', + iobId: deviceId + '.0d.precipitationChance', + initialValue: 40, + updatedValue: 50 + }, { + attribute: 'forecast.0.datetime', + iobId: deviceId + '.0d.date', + initialValue: 'Mi', + updatedValue: 'Do' + }, { + attribute: 'forecast.0.humidity', + iobId: deviceId + '.0d.humidity', + initialValue: 30, + updatedValue: 40 + }, { + attribute: 'forecast.1.condition', iobId: deviceId + '.1d.iconURL', initialValue: 'iconURL1', updatedValue: 'iconURL1Updated' }, { - attribute: 'forecast.0.temperature', + attribute: 'forecast.1.temperature', iobId: deviceId + '.1d.tempMax', initialValue: 10, updatedValue: 11 }, { - attribute: 'forecast.0.templow', + attribute: 'forecast.1.templow', iobId: deviceId + '.1d.tempMin', initialValue: 8, updatedValue: 9 }, { - attribute: 'forecast.0.precipitation_probability', + attribute: 'forecast.1.precipitation_probability', iobId: deviceId + '.1d.precipitationChance', initialValue: 50, updatedValue: 60 }, { - attribute: 'forecast.0.datetime', + attribute: 'forecast.1.datetime', iobId: deviceId + '.1d.date', initialValue: 'Do', updatedValue: 'Fr' }, { - attribute: 'forecast.0.humidity', + attribute: 'forecast.1.humidity', iobId: deviceId + '.1d.humidity', initialValue: 34, updatedValue: 45 }, { - attribute: 'forecast.1.condition', + attribute: 'forecast.2.condition', iobId: deviceId + '.2d.iconURL', initialValue: 'iconURL2', updatedValue: 'iconURL2Updated' }, { - attribute: 'forecast.1.temperature', + attribute: 'forecast.2.temperature', iobId: deviceId + '.2d.tempMax', initialValue: 12, updatedValue: 13 }, { - attribute: 'forecast.1.templow', + attribute: 'forecast.2.templow', iobId: deviceId + '.2d.tempMin', initialValue: 7, updatedValue: 8 }, { - attribute: 'forecast.1.precipitation_probability', + attribute: 'forecast.2.precipitation_probability', iobId: deviceId + '.2d.precipitationChance', initialValue: 51, updatedValue: 61 }, { - attribute: 'forecast.1.datetime', + attribute: 'forecast.2.datetime', iobId: deviceId + '.2d.date', initialValue: 'Fr', updatedValue: 'Sa' }, { - attribute: 'forecast.1.humidity', + attribute: 'forecast.2.humidity', iobId: deviceId + '.2d.humidity', initialValue: 51, updatedValue: 60 }, { - attribute: 'forecast.2.condition', + attribute: 'forecast.3.condition', iobId: deviceId + '.3d.iconURL', initialValue: 'iconURL3', updatedValue: 'iconURL3Updated' }, { - attribute: 'forecast.2.temperature', + attribute: 'forecast.3.temperature', iobId: deviceId + '.3d.tempMax', initialValue: 14, updatedValue: 15 }, { - attribute: 'forecast.2.templow', + attribute: 'forecast.3.templow', iobId: deviceId + '.3d.tempMin', initialValue: 4, updatedValue: 5 }, { - attribute: 'forecast.2.precipitation_probability', + attribute: 'forecast.3.precipitation_probability', iobId: deviceId + '.3d.precipitationChance', initialValue: 52, updatedValue: 62 }, { - attribute: 'forecast.2.datetime', + attribute: 'forecast.3.datetime', iobId: deviceId + '.3d.date', initialValue: 'Sa', updatedValue: 'So' }, { - attribute: 'forecast.2.humidity', + attribute: 'forecast.3.humidity', iobId: deviceId + '.3d.humidity', initialValue: 32, updatedValue: 41 diff --git a/test/testData/weather_weatherunderground.json b/test/testData/weather_weatherunderground.json index 4c8e1cc70..0e5dfb173 100644 --- a/test/testData/weather_weatherunderground.json +++ b/test/testData/weather_weatherunderground.json @@ -2573,29 +2573,6 @@ "ownerGroup": "system.group.administrator" } }, - "weatherunderground.0.forecast.current.observationTime": { - "type": "state", - "common": { - "name": "Observation time (rfc822)", - "role": "date", - "type": "string", - "read": true, - "write": false - }, - "native": { - "id": "current_observation.local_epoch" - }, - "from": "system.adapter.weatherunderground.0", - "user": "system.user.admin", - "ts": 1625152451311, - "_id": "weatherunderground.0.forecast.current.observationTime", - "acl": { - "object": 1636, - "state": 1636, - "owner": "system.user.admin", - "ownerGroup": "system.group.administrator" - } - }, "weatherunderground.0.forecast.current.observationTimeRFC822": { "type": "state", "common": { From d1d48042c565e214225ac9078dd40a16f6130c61 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 20:49:18 +0200 Subject: [PATCH 18/35] extend ignore of erreronous zigbee states --- lib/converters/light.js | 2 +- lib/converters/switch.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/converters/light.js b/lib/converters/light.js index ea7c1070c..2bd90bf1b 100644 --- a/lib/converters/light.js +++ b/lib/converters/light.js @@ -66,7 +66,7 @@ function _getLightAdvancedState(control) { function _lightAdvancedAddState(states, objects, entity) { const getState = states.stateRead; //prevent zigbee 'available' to become getId: - if (getState && getState.indexOf('zigbee.') === 0 && getState.indexOf('.available') > 0) { + if (getState && getState.startsWith('zigbee.') && (getState.endsWith('.available') || getState.endsWith('.device_query'))) { entity.context.STATE.getId = states.state; } if (states.state) { diff --git a/lib/converters/switch.js b/lib/converters/switch.js index 7497fe485..f20fc99a9 100644 --- a/lib/converters/switch.js +++ b/lib/converters/switch.js @@ -21,8 +21,10 @@ exports.processSocket = function (id, control, name, room, func, _obj, objects, state = control.states.find(s => s.id && s.name === 'ACTUAL'); if (state && state.id) { - entity.context.STATE.getId = state.id; - utils.addID2entity(state.id, entity); + if (!state.startsWith('zigbee.') || !state.endsWith('.available') || !state.endsWith('.device_query')) { + entity.context.STATE.getId = state.id; + utils.addID2entity(state.id, entity); + } } return [entity]; From a09e740868ec9679651ce7cd7dc18a86a061656a Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 20:51:31 +0200 Subject: [PATCH 19/35] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index dc8f32f81..c69955330 100644 --- a/README.md +++ b/README.md @@ -468,6 +468,9 @@ After that checkout modified version in `./build` folder. Then. PLACEHOLDER for next version: ### **WORK IN PROGRESS** --> +### **WORK IN PROGRESS** +* (Garfonso) fixed: Date shift for weather forecast without date state. + ### 2.0.1 (2021-07-01) * (Garfonso) fixed: Zigbee lights (issue 222). From e4ccca704e7c59f126fb3b78f3b903c675299cd7 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 20:51:44 +0200 Subject: [PATCH 20/35] chore: release v2.0.2 fixed: Date shift for weather forecast without date state. --- CHANGELOG_OLD.md | 3 + README.md | 5 +- io-package.json | 26 ++++---- package-lock.json | 164 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 5 files changed, 181 insertions(+), 19 deletions(-) diff --git a/CHANGELOG_OLD.md b/CHANGELOG_OLD.md index 5cab7b323..2e0512e94 100644 --- a/CHANGELOG_OLD.md +++ b/CHANGELOG_OLD.md @@ -1,5 +1,8 @@ # Older Changes +## 1.4.2 (2021-01-08) +* (thost96) Fixed: set Theme state type to string instead of text + ## 1.4.1 (2021-01-08) * (bluefox) Support of new Let's Encrypt (only with js-controller 3.2.x) diff --git a/README.md b/README.md index c69955330..449e3f55c 100644 --- a/README.md +++ b/README.md @@ -468,7 +468,7 @@ After that checkout modified version in `./build` folder. Then. PLACEHOLDER for next version: ### **WORK IN PROGRESS** --> -### **WORK IN PROGRESS** +### 2.0.2 (2021-07-04) * (Garfonso) fixed: Date shift for weather forecast without date state. ### 2.0.1 (2021-07-01) @@ -504,9 +504,6 @@ After that checkout modified version in `./build` folder. Then. ### 1.4.3 (2021-02-01) * (bluefox) Support of lovelace via ioBroker.pro -### 1.4.2 (2021-01-08) -* (thost96) Fixed: set Theme state type to string instead of text - ## License Copyright 2019-2021, bluefox diff --git a/io-package.json b/io-package.json index cbba38a0a..1cf05ca0b 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,20 @@ { "common": { "name": "lovelace", - "version": "2.0.1", + "version": "2.0.2", "news": { + "2.0.2": { + "en": "fixed: Date shift for weather forecast without date state.", + "de": "behoben: Datumsverschiebung für Wettervorhersage ohne Datumsstatus.", + "ru": "исправлено: сдвиг даты для прогноза погоды без состояния даты.", + "pt": "fixo: Mudança de data para previsão do tempo sem estado de data.", + "nl": "vast: Datumverschuiving voor weersvoorspelling zonder datumstaat.", + "fr": "fixe : décalage de date pour les prévisions météorologiques sans état de date.", + "it": "risolto: spostamento della data per le previsioni del tempo senza stato della data.", + "es": "fijo: Cambio de fecha para el pronóstico del tiempo sin estado de fecha.", + "pl": "naprawiono: Przesunięcie daty dla prognozy pogody bez podania daty.", + "zh-cn": "固定:没有日期状态的天气预报的日期偏移。" + }, "2.0.1": { "en": "fixed: Zigbee lights (issue 222).", "de": "behoben: Zigbee-Lichter (Ausgabe 222).", @@ -230,18 +242,6 @@ "es": "* (Garfonso) Agregado: Soporte para la entidad de cobertura (las entidades de cobertura y input_number ahora se crean para las persianas)\n* (Garfonso) Añadido: Soporte para nuevos tipos de ciegos que permiten que lovelace determine la dirección del 0/100%\n* (Garfonso) Corregido: prefiera ON_LIGHT para luces si está presente, debería solucionar los casos en los que también hay un estado de interruptor en un dispositivo de luz.\n* (Garfonso) Agregado: Habilite el soporte de historial, muestremos más información sobre el historial de estados\n* (Garfonso) Agregado: entidad zone.home desde system.config (es decir, lat / long)\n* (Garfonso) Corregido: Hacer que los dispositivos de puerta creen una entidad de puerta device_class\n* (Garfonso) Corregido: se agregaron algunas traducciones faltantes, se mejoró un poco la traducción, se agregó el nombre de dominio a las traducciones en la pestaña personalizada.", "pl": "* (Garfonso) Dodano: Obsługa encji ubezpieczeniowej (encja cover i liczba_wejściowa są teraz tworzone dla blindów)\n* (Garfonso) Dodano: Wsparcie dla nowych typów blindów, które pozwalają lovelace określić kierunek 0/100%\n* (Garfonso) Naprawiono: Preferuj ON_LIGHT dla świateł, jeśli są obecne, powinno naprawić przypadki, w których występuje również stan przełącznika w urządzeniu świetlnym.\n* (Garfonso) Dodano: Włącz obsługę historii, dowiedzmy się więcej o historii stanów\n* (Garfonso) Dodano: encja zone.home z system.config (tj. Lat / long)\n* (Garfonso) Naprawiono: Spraw, aby urządzenia drzwiowe tworzyły element drzwi_klasy device_class\n* (Garfonso) Naprawiono: Dodano trochę brakujących tłumaczeń, trochę poprawiono tłumaczenie, dodano nazwę domeny do tłumaczeń w zakładce niestandardowej.", "zh-cn": "*(Garfonso)已添加:支持封面实体(现在为盲人创建了cover和input_number实体)\n*(Garfonso)已添加:支持新的百叶窗类型,让lovelace确定方向为0/100%\n*(加芬索(Garfonso))修复:如果有灯光,则最好选择ON_LIGHT,如果存在灯光,应解决灯光设备中也存在开关状态的情况。\n*(Garfonso)已添加:启用历史记录支持,让我们更多信息显示状态历史记录\n*(Garfonso)已添加:system.config中的zone.home实体(即lat / long)\n*(Garfonso)固定:使门设备创建device_class门实体\n*(Garfonso)固定:添加了一些缺少的翻译,改进了一点翻译,在自定义标签中为翻译添加了域名。" - }, - "1.1.0": { - "en": "* (Garfonso) BREAKING: fixed issue with entity_id generation which now allows umlauts to be replaced by ue/ae/oe.\n* (Garfonso) added windowsTilt device type\n* (Garfonso) reworked friendly name for auto generated entities, allow space in name.\n* (Garfonso) use device_class feature for sensors (where applicable) -> results in translation features of lovelace being used.\n* (Garfonso) multiple fixes/additions to media player (like volume scaling, on/off support, shuffle support, stop support) \n", - "de": "* (Garfonso) BREAKING: Problem mit der Entität entity_id behoben, durch das Umlaute jetzt durch ue / ae / oe ersetzt werden können.\n* (Garfonso) hat den WindowsTilt-Gerätetyp hinzugefügt\n* (Garfonso) Überarbeiteter Anzeigename für automatisch generierte Entitäten, lassen Sie Platz im Namen.\n* (Garfonso) verwendet die Funktion device_class für Sensoren (falls zutreffend) -> führt dazu, dass Übersetzungsfunktionen von Lovelace verwendet werden.\n* (Garfonso) mehrere Korrekturen / Ergänzungen zum Media Player (wie Lautstärkeskalierung, Ein / Aus-Unterstützung, Shuffle-Unterstützung, Stop-Unterstützung)\n", - "ru": "* (Garfonso) BREAKING: исправлена проблема с генерацией entity_id, которая теперь позволяет заменять умлауты на ue / ae / oe.\n* (Гарфонсо) добавлен тип устройства windowsTilt\n* (Гарфонсо) переработанное понятное имя для автоматически сгенерированных сущностей, оставьте место в имени\n* (Гарфонсо) использовать функцию device_class для датчиков (где применимо) -> приводит к использованию функций перевода lovelace.\n* (Garfonso) несколько исправлений / дополнений в медиаплеере (например, масштабирование громкости, поддержка включения / выключения, поддержка перемешивания, поддержка остановки)\n", - "pt": "* (Garfonso) BREAKING: problema corrigido com a geração entity_id, que agora permite que os tremas sejam substituídos por ue / ae / oe.\n* (Garfonso) adicionou o tipo de dispositivo windowsTilt\n* (Garfonso) reformulou o nome amigável para entidades geradas automaticamente, permite espaço no nome.\n* (Garfonso) usa o recurso device_class para sensores (quando aplicável) -> resulta no uso de recursos de tradução do lovelace.\n* (Garfonso) várias correções / adições ao media player (como redimensionamento de volume, suporte on / off, suporte a shuffle, suporte a interrupção)\n", - "nl": "* (Garfonso) BREAKING: probleem opgelost met het genereren van entiteit_id waardoor umlauts nu kunnen worden vervangen door ue / ae / oe.\n* (Garfonso) toegevoegd windowsTilt apparaattype\n* (Garfonso) herwerkte vriendelijke naam voor automatisch gegenereerde entiteiten, laat ruimte in naam toe.\n* (Garfonso) gebruik device_class-functie voor sensoren (indien van toepassing) -> resulteert in vertaalfuncties van lovelace die worden gebruikt.\n* (Garfonso) meerdere fixes / toevoegingen aan mediaspeler (zoals volumeschaling, aan / uit-ondersteuning, shuffle-ondersteuning, stop-ondersteuning)\n", - "fr": "* (Garfonso) BREAKING: correction d'un problème avec la génération entity_id qui permet désormais de remplacer les trémas par ue / ae / oe.\n* (Garfonso) a ajouté le type d'appareil windowsTilt\n* (Garfonso) nom convivial retravaillé pour les entités générées automatiquement, laissez de l'espace dans le nom.\n* (Garfonso) utilise la fonction device_class pour les capteurs (le cas échéant) -> entraîne l'utilisation des fonctions de traduction de lovelace.\n* (Garfonso) plusieurs correctifs / ajouts au lecteur multimédia (comme la mise à l'échelle du volume, la prise en charge marche / arrêt, la prise en charge aléatoire, l'arrêt de la prise en charge)\n", - "it": "* (Garfonso) BREAKING: risolto problema con la generazione entity_id che ora consente di sostituire le umlaut con ue / ae / oe.\n* (Garfonso) aggiunto il tipo di dispositivo windowsTilt\n* (Garfonso) rielaborato il nome descrittivo per le entità generate automaticamente, consente lo spazio nel nome.\n* (Garfonso) usa la funzione device_class per i sensori (dove applicabile) -> si traduce in funzioni di traduzione della lovelace in uso.\n* (Garfonso) più correzioni / aggiunte al lettore multimediale (come ridimensionamento del volume, supporto on / off, supporto shuffle, supporto stop)\n", - "es": "* (Garfonso) BREAKING: se solucionó el problema con la generación entity_id que ahora permite que las diéresis sean reemplazadas por ue / ae / oe.\n* (Garfonso) agregó el tipo de dispositivo windowsTilt\n* (Garfonso) reelaborado el nombre descriptivo para las entidades generadas automáticamente, deje espacio en el nombre.\n* (Garfonso) usa la función device_class para los sensores (cuando corresponde) -> da como resultado que se usen las funciones de traducción de lovelace.\n* (Garfonso) múltiples correcciones / adiciones al reproductor multimedia (como escala de volumen, soporte de encendido / apagado, soporte aleatorio, detener soporte)\n", - "pl": "* (Garfonso) ŁAMANIE: naprawiono problem z generowaniem bytu_id, który teraz pozwala na zastąpienie umlautów przez ue / ae / oe.\n* (Garfonso) dodano typ urządzenia WindowsTilt\n* (Garfonso) przerobiono przyjazną nazwę dla automatycznie generowanych encji, pozostaw miejsce w nazwie.\n* (Garfonso) użyj funkcji device_class dla czujników (w stosownych przypadkach) -> powoduje użycie funkcji tłumaczenia lovelace.\n* (Garfonso) wiele poprawek / dodatków do odtwarzacza multimedialnego (takich jak skalowanie głośności, obsługa włączania / wyłączania, obsługa odtwarzania losowego, obsługa zatrzymywania)\n", - "zh-cn": "*(Garfonso)BREAKING:修复了Entity_id生成的问题,该问题现在允许将变音符号替换为ue / ae / oe。\n*(Garfonso)添加了WindowsTilt设备类型\n*(Garfonso)重命名了自动生成的实体的友好名称,名称中留有空格。\n*(Garfonso)对传感器使用device_class功能(如果适用)->导致使用lovelace的翻译功能。\n*(Garfonso)对媒体播放器的多项修复/添加(例如音量缩放,开/关支持,随机播放支持,停止支持)\n" } }, "title": "Visualization with Lovelace-UI", diff --git a/package-lock.json b/package-lock.json index 0146c9ed2..eb02f8beb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "iobroker.lovelace", - "version": "2.0.1", + "version": "2.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -750,12 +750,45 @@ "@types/iobroker": "^3.3.0" } }, + "@iobroker/db-base": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@iobroker/db-base/-/db-base-1.2.4.tgz", + "integrity": "sha512-40JQxdMXscu8bFfgjUbb3pz2nffE+96451q8Xq7PwWh1wVX19tu4LiO7MMORUUTUL6v/y9si/scaJ7jOhnAl1w==", + "dev": true, + "requires": { + "deep-clone": "^3.0.3", + "fs-extra": "^9.1.0", + "node.extend": "^2.0.2", + "respjs": "^4.2.0" + } + }, + "@iobroker/db-states-file": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@iobroker/db-states-file/-/db-states-file-1.2.7.tgz", + "integrity": "sha512-Qlf/X/jo3WUTKeuoAQ6ZDRx2GgjXGYXQPzGtiufEAlvccYnniVU1ms9ZIZY7wkIIP0bUcZVDOpG5RnfY7K57Sg==", + "dev": true, + "requires": { + "@iobroker/db-base": "1.2.4", + "@iobroker/db-states-redis": "1.2.7" + } + }, + "@iobroker/db-states-redis": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@iobroker/db-states-redis/-/db-states-redis-1.2.7.tgz", + "integrity": "sha512-E/BJvu3D13/eDk6SpUD6ZVYANJd5VlDbmxvlMgIOIRfqFg84pzQviTfzcol5Ykw7lG3HEj4KQ9631oLs+dN51w==", + "dev": true, + "requires": { + "@iobroker/db-base": "1.2.4", + "ioredis": "^4.27.5" + } + }, "@iobroker/testing": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-2.4.4.tgz", "integrity": "sha512-uvIP0tZ9PRdrV9450A5Z2BShk7MplQWmILSuwCRfQcZiQDsW/mc/OUOePYwcD/foQaxnDYvdxtR3mK92AzWJGw==", "dev": true, "requires": { + "@iobroker/db-states-file": "^1.2.7", "alcalzone-shared": "~3.0.1", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", @@ -2317,6 +2350,12 @@ } } }, + "cluster-key-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz", + "integrity": "sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw==", + "dev": true + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -2544,6 +2583,12 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "deep-clone": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/deep-clone/-/deep-clone-3.0.3.tgz", + "integrity": "sha512-6jtXIlCBAwr3GP/7Il52clbIFIKAxg/pnNkL4/sE6+Oqb10MXMtm9LDZV2IAuwdaKV9VBm8hlxAFk9r6pF8XRw==", + "dev": true + }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -2653,6 +2698,12 @@ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "optional": true }, + "denque": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", + "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==", + "dev": true + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -4399,6 +4450,15 @@ "glogg": "^1.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4606,11 +4666,58 @@ "resolved": "https://registry.npmjs.org/iobroker.type-detector/-/iobroker.type-detector-1.0.14.tgz", "integrity": "sha512-RCfAeuHGx0zAf7LlRiDGWIyE2p6eEqisrkkcaV+zk47ScxH8QtV1X1yHUi33L62gcU3MNkmxMswGD29HHdDsnQ==" }, + "ioredis": { + "version": "4.27.6", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-4.27.6.tgz", + "integrity": "sha512-6W3ZHMbpCa8ByMyC1LJGOi7P2WiOKP9B3resoZOVLDhi+6dDBOW+KNsRq3yI36Hmnb2sifCxHX+YSarTeXh48A==", + "dev": true, + "requires": { + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.1", + "denque": "^1.1.0", + "lodash.defaults": "^4.2.0", + "lodash.flatten": "^4.4.0", + "p-map": "^2.1.0", + "redis-commands": "1.7.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true + } + } + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" }, + "is": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz", + "integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg==", + "dev": true + }, "is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", @@ -5144,6 +5251,18 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", @@ -5821,6 +5940,16 @@ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==" }, + "node.extend": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-2.0.2.tgz", + "integrity": "sha512-pDT4Dchl94/+kkgdwyS2PauDFjZG0Hk0IcHIB+LkW27HLDtdoeMxHTxZh39DYbPP8UflWXWj9JcdDozF+YDOpQ==", + "dev": true, + "requires": { + "has": "^1.0.3", + "is": "^3.2.1" + } + }, "nodejieba": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/nodejieba/-/nodejieba-2.5.2.tgz", @@ -6710,6 +6839,27 @@ "resolve": "^1.1.6" } }, + "redis-commands": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz", + "integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==", + "dev": true + }, + "redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=", + "dev": true + }, + "redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=", + "dev": true, + "requires": { + "redis-errors": "^1.0.0" + } + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -6847,6 +6997,12 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, + "respjs": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/respjs/-/respjs-4.2.0.tgz", + "integrity": "sha512-/W219Wpyo0m6bVN9z/rqhe0ek6nJ7Tus9WhbWpA8aJI8FxtMrQw1u8RStxOswTyUrW/NXaKXuaNfKZFKYbwXkg==", + "dev": true + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -7308,6 +7464,12 @@ "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", "dev": true }, + "standard-as-callback": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==", + "dev": true + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", diff --git a/package.json b/package.json index d33f055f6..3690505ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.lovelace", - "version": "2.0.1", + "version": "2.0.2", "description": "With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI", "author": { "name": "bluefox", From ef346f32512f347051f9b3d56a408639930694bb Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 20:54:36 +0200 Subject: [PATCH 21/35] fix typo --- lib/converters/switch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/converters/switch.js b/lib/converters/switch.js index f20fc99a9..fcaa7f0db 100644 --- a/lib/converters/switch.js +++ b/lib/converters/switch.js @@ -21,7 +21,7 @@ exports.processSocket = function (id, control, name, room, func, _obj, objects, state = control.states.find(s => s.id && s.name === 'ACTUAL'); if (state && state.id) { - if (!state.startsWith('zigbee.') || !state.endsWith('.available') || !state.endsWith('.device_query')) { + if (!state.id.startsWith('zigbee.') || !state.id.endsWith('.available') || !state.id.endsWith('.device_query')) { entity.context.STATE.getId = state.id; utils.addID2entity(state.id, entity); } From c87f195d796924692dc91ae14d5ebf8273cffd14 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 21:00:11 +0200 Subject: [PATCH 22/35] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 449e3f55c..98dfa5189 100644 --- a/README.md +++ b/README.md @@ -468,6 +468,9 @@ After that checkout modified version in `./build` folder. Then. PLACEHOLDER for next version: ### **WORK IN PROGRESS** --> +### **WORK IN PROGRESS** +* (Garfonso) fix typo. + ### 2.0.2 (2021-07-04) * (Garfonso) fixed: Date shift for weather forecast without date state. From f21dda6b5a7adfcbf36d586e5e1affdd973ba5d0 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sun, 4 Jul 2021 21:00:20 +0200 Subject: [PATCH 23/35] chore: release v2.0.3 fix typo. --- CHANGELOG_OLD.md | 3 +++ README.md | 5 +---- io-package.json | 26 +++++++++++++------------- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGELOG_OLD.md b/CHANGELOG_OLD.md index 2e0512e94..0932626eb 100644 --- a/CHANGELOG_OLD.md +++ b/CHANGELOG_OLD.md @@ -1,5 +1,8 @@ # Older Changes +## 1.4.3 (2021-02-01) +* (bluefox) Support of lovelace via ioBroker.pro + ## 1.4.2 (2021-01-08) * (thost96) Fixed: set Theme state type to string instead of text diff --git a/README.md b/README.md index 98dfa5189..736c34706 100644 --- a/README.md +++ b/README.md @@ -468,7 +468,7 @@ After that checkout modified version in `./build` folder. Then. PLACEHOLDER for next version: ### **WORK IN PROGRESS** --> -### **WORK IN PROGRESS** +### 2.0.3 (2021-07-04) * (Garfonso) fix typo. ### 2.0.2 (2021-07-04) @@ -504,9 +504,6 @@ After that checkout modified version in `./build` folder. Then. * (Garfonso) Fixed: default themes do not show as selected * (Garfonso) Fixed: Loading themes / custom cards / image-proxy -### 1.4.3 (2021-02-01) -* (bluefox) Support of lovelace via ioBroker.pro - ## License Copyright 2019-2021, bluefox diff --git a/io-package.json b/io-package.json index 1cf05ca0b..22bb1e080 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,20 @@ { "common": { "name": "lovelace", - "version": "2.0.2", + "version": "2.0.3", "news": { + "2.0.3": { + "en": "fix typo.", + "de": "Tippfehler beheben.", + "ru": "исправить опечатку.", + "pt": "corrigir erro de digitação.", + "nl": "typfout herstellen.", + "fr": "corriger une faute de frappe.", + "it": "correggere l'errore di battitura.", + "es": "corregir error tipográfico.", + "pl": "naprawić literówkę.", + "zh-cn": "修复错字。" + }, "2.0.2": { "en": "fixed: Date shift for weather forecast without date state.", "de": "behoben: Datumsverschiebung für Wettervorhersage ohne Datumsstatus.", @@ -230,18 +242,6 @@ "es": "* (Garfonso) Actualizado Hass Lovelace. Lo que repara la tarjeta meteorológica, sin iconos meteorológicos con autorización y (¿tal vez?) Credenciales de la tienda\n* (Garfonso) Corrección: el editor yaml desaparece en Firefox\n* (Garfonso) Agregado: Soporte para nuevos tipos de persianas (necesita actualización de detector de tipo)", "pl": "* (Garfonso) Zaktualizowano Hass Lovelace. Który naprawia kartę pogody, brak ikon pogody z autoryzacją i (może?) Dane logowania\n* (Garfonso) Poprawka: w przeglądarce Firefox brakuje edytora yaml\n* (Garfonso) Dodano: Wsparcie dla nowego rodzaju żaluzji (wymaga aktualizacji detektora typu)", "zh-cn": "*(Garfonso)更新了Hass Lovelace。哪个可以修复天气卡,没有授权的天气图标和(也许?)存储凭据\n*(Garfonso)修复:Firefox上缺少yaml编辑器\n*(Garfonso)已添加:支持新型百叶窗(需要更新类型检测器)" - }, - "1.2.0": { - "en": "* (Garfonso) Added: Support for cover entity (cover and input_number entities are now created for blinds)\n* (Garfonso) Added: Support for new blind types which let lovelace determine direction of 0/100%\n* (Garfonso) Fixed: Prefer ON_LIGHT for lights if present, should fix cases where there is also a switch state in a light device.\n* (Garfonso) Added: Enable history support, let's more-info show history of states\n* (Garfonso) Added: zone.home entity from system.config (i.e. lat/long)\n* (Garfonso) Fixed: Make door devices create a device_class door entity\n* (Garfonso) Fixed: Added some missing translations, improved translation a bit, added domain name to translations in custom tab.", - "de": "* (Garfonso) Hinzugefügt: Unterstützung für Cover-Entitäten (Cover- und Input-Nummer-Entitäten werden jetzt für Blinds erstellt)\n* (Garfonso) Hinzugefügt: Unterstützung für neue Blindtypen, bei denen die Liebe die Richtung von 0/100% bestimmen kann\n* (Garfonso) Behoben: Bevorzugen Sie ON_LIGHT für Lichter, falls vorhanden, sollten Fälle behoben werden, in denen auch in einem Lichtgerät ein Schaltzustand vorliegt.\n* (Garfonso) Hinzugefügt: Aktivieren Sie die Verlaufsunterstützung. Lassen Sie uns mehr Informationen zum Verlauf der Zustände anzeigen\n* (Garfonso) Hinzugefügt: zone.home-Entität aus system.config (d. H. Lat / long)\n* (Garfonso) Behoben: Türgeräte eine Türentität der Geräteklasse erstellen lassen\n* (Garfonso) Behoben: Einige fehlende Übersetzungen wurden hinzugefügt, die Übersetzung etwas verbessert und den Übersetzungen auf der benutzerdefinierten Registerkarte den Domainnamen hinzugefügt.", - "ru": "* (Гарфонсо) Добавлено: Поддержка объекта покрытия (теперь для блайндов создаются объекты cover и input_number)\n* (Гарфонсо) Добавлено: Поддержка новых типов слепых, которые позволяют ловеласу определять направление 0/100%.\n* (Garfonso) Исправлено: предпочтение ON_LIGHT для источников света, если оно присутствует, должно исправлять случаи, когда в устройстве освещения также имеется состояние переключения.\n* (Гарфонсо) Добавлено: Включите поддержку истории, давайте больше информации покажем историю состояний\n* (Гарфонсо) Добавлено: сущность zone.home из system.config (т.е. широта / долгота)\n* (Гарфонсо) Исправлено: заставить дверные устройства создавать дверную сущность device_class\n* (Гарфонсо) Исправлено: добавлены некоторые недостающие переводы, немного улучшен перевод, добавлено доменное имя к переводам в пользовательской вкладке.", - "pt": "* (Garfonso) Adicionado: Suporte para entidade de cobertura (entidades de cobertura e número de entrada agora são criadas para blinds)\n* (Garfonso) Adicionado: Suporte para novos tipos de blinds que permitem ao lovelace determinar a direção de 0/100%\n* (Garfonso) Corrigido: Prefira ON_LIGHT para luzes, se houver, deve corrigir casos em que também há um estado de comutação em um dispositivo de luz.\n* (Garfonso) Adicionado: ative o suporte ao histórico, vamos mostrar mais informações do histórico dos estados\n* (Garfonso) Adicionado: entidade zone.home do system.config (ou seja, lat / long)\n* (Garfonso) Corrigido: Faça com que os dispositivos de porta criem uma entidade de porta device_class\n* (Garfonso) Corrigido: Adicionadas algumas traduções ausentes, melhorada um pouco a tradução, adicionado nome de domínio às traduções na guia personalizada.", - "nl": "* (Garfonso) Toegevoegd: Ondersteuning voor coverentiteit (cover- en input_number-entiteiten zijn nu gemaakt voor blinds)\n* (Garfonso) Toegevoegd: Ondersteuning voor nieuwe blinde types die de lovelace de richting van 0/100% laten bepalen\n* (Garfonso) Opgelost: geef de voorkeur aan ON_LIGHT voor lichten indien aanwezig, moet gevallen oplossen waarin er ook een schakeltoestand is in een lichtapparaat.\n* (Garfonso) Toegevoegd: Schakel geschiedenisondersteuning in, laten we meer informatie de geschiedenis van staten tonen\n* (Garfonso) Toegevoegd: zone.home-entiteit van system.config (d.w.z. lat / long)\n* (Garfonso) Opgelost: laat deurapparaten een deureenheid device_class maken\n* (Garfonso) Opgelost: enkele ontbrekende vertalingen toegevoegd, verbeterde vertaling een beetje, domeinnaam toegevoegd aan vertalingen op aangepast tabblad.", - "fr": "* (Garfonso) Ajouté: Prise en charge de l'entité de couverture (les entités de couverture et d'entrée_nombre sont maintenant créées pour les stores)\n* (Garfonso) Ajouté: Prise en charge de nouveaux types de stores qui permettent à Lovelace de déterminer la direction de 0/100%\n* (Garfonso) Corrigé: Préférez ON_LIGHT pour les lumières si elles sont présentes, devrait corriger les cas où il y a aussi un état de commutation dans un dispositif d'éclairage.\n* (Garfonso) Ajouté: Activer la prise en charge de l'historique, disons plus d'informations sur l'historique des états\n* (Garfonso) Ajouté: entité zone.home de system.config (c'est-à-dire lat / long)\n* (Garfonso) Corrigé: Faire que les dispositifs de porte créent une entité de porte device_class\n* (Garfonso) Correction: Ajout de quelques traductions manquantes, amélioration un peu de la traduction, ajout du nom de domaine aux traductions dans l'onglet personnalisé.", - "it": "* (Garfonso) Aggiunto: Supporto per entità di copertura (le entità di copertina e input_number sono ora create per i blind)\n* (Garfonso) Aggiunto: Supporto per nuovi tipi ciechi che consentono alla lovelace di determinare la direzione dello 0/100%\n* (Garfonso) Risolto: preferisci ON_LIGHT per le luci, se presenti, dovrebbe risolvere i casi in cui c'è anche uno stato di commutazione in un dispositivo di illuminazione.\n* (Garfonso) Aggiunto: abilita il supporto della cronologia, mostriamo più informazioni sulla cronologia degli stati\n* (Garfonso) Aggiunto: entità zone.home da system.config (cioè lat / long)\n* (Garfonso) Risolto: i dispositivi delle porte creavano un'entità porta device_class\n* (Garfonso) Risolto: Aggiunte alcune traduzioni mancanti, migliorata un po 'la traduzione, aggiunto il nome di dominio alle traduzioni nella scheda personalizzata.", - "es": "* (Garfonso) Agregado: Soporte para la entidad de cobertura (las entidades de cobertura y input_number ahora se crean para las persianas)\n* (Garfonso) Añadido: Soporte para nuevos tipos de ciegos que permiten que lovelace determine la dirección del 0/100%\n* (Garfonso) Corregido: prefiera ON_LIGHT para luces si está presente, debería solucionar los casos en los que también hay un estado de interruptor en un dispositivo de luz.\n* (Garfonso) Agregado: Habilite el soporte de historial, muestremos más información sobre el historial de estados\n* (Garfonso) Agregado: entidad zone.home desde system.config (es decir, lat / long)\n* (Garfonso) Corregido: Hacer que los dispositivos de puerta creen una entidad de puerta device_class\n* (Garfonso) Corregido: se agregaron algunas traducciones faltantes, se mejoró un poco la traducción, se agregó el nombre de dominio a las traducciones en la pestaña personalizada.", - "pl": "* (Garfonso) Dodano: Obsługa encji ubezpieczeniowej (encja cover i liczba_wejściowa są teraz tworzone dla blindów)\n* (Garfonso) Dodano: Wsparcie dla nowych typów blindów, które pozwalają lovelace określić kierunek 0/100%\n* (Garfonso) Naprawiono: Preferuj ON_LIGHT dla świateł, jeśli są obecne, powinno naprawić przypadki, w których występuje również stan przełącznika w urządzeniu świetlnym.\n* (Garfonso) Dodano: Włącz obsługę historii, dowiedzmy się więcej o historii stanów\n* (Garfonso) Dodano: encja zone.home z system.config (tj. Lat / long)\n* (Garfonso) Naprawiono: Spraw, aby urządzenia drzwiowe tworzyły element drzwi_klasy device_class\n* (Garfonso) Naprawiono: Dodano trochę brakujących tłumaczeń, trochę poprawiono tłumaczenie, dodano nazwę domeny do tłumaczeń w zakładce niestandardowej.", - "zh-cn": "*(Garfonso)已添加:支持封面实体(现在为盲人创建了cover和input_number实体)\n*(Garfonso)已添加:支持新的百叶窗类型,让lovelace确定方向为0/100%\n*(加芬索(Garfonso))修复:如果有灯光,则最好选择ON_LIGHT,如果存在灯光,应解决灯光设备中也存在开关状态的情况。\n*(Garfonso)已添加:启用历史记录支持,让我们更多信息显示状态历史记录\n*(Garfonso)已添加:system.config中的zone.home实体(即lat / long)\n*(Garfonso)固定:使门设备创建device_class门实体\n*(Garfonso)固定:添加了一些缺少的翻译,改进了一点翻译,在自定义标签中为翻译添加了域名。" } }, "title": "Visualization with Lovelace-UI", diff --git a/package-lock.json b/package-lock.json index eb02f8beb..fcaae60ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "iobroker.lovelace", - "version": "2.0.2", + "version": "2.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3690505ee..ed0fd38c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.lovelace", - "version": "2.0.2", + "version": "2.0.3", "description": "With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI", "author": { "name": "bluefox", From 7cab9097fa75c7b373fcd0291cb7698a29521b19 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Mon, 5 Jul 2021 15:03:27 +0200 Subject: [PATCH 24/35] add npm cache --- .github/workflows/test-and-release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 09b684fb6..844584564 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -32,9 +32,10 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + cache: npm - name: Install Dependencies run: npm i @@ -61,9 +62,10 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + cache: npm - name: Install Dependencies run: npm i @@ -92,15 +94,17 @@ jobs: strategy: matrix: node-version: [14.x] + cache: npm steps: - name: Checkout code uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + cache: npm - name: Extract the version and commit body from the tag id: extract_release From deb0614bfa75810a29ec569e12cf9ca7a150b6f3 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Mon, 5 Jul 2021 15:04:25 +0200 Subject: [PATCH 25/35] Revert "add npm cache" This reverts commit 7cab9097fa75c7b373fcd0291cb7698a29521b19. --- .github/workflows/test-and-release.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 844584564..09b684fb6 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -32,10 +32,9 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - cache: npm - name: Install Dependencies run: npm i @@ -62,10 +61,9 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - cache: npm - name: Install Dependencies run: npm i @@ -94,17 +92,15 @@ jobs: strategy: matrix: node-version: [14.x] - cache: npm steps: - name: Checkout code uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - cache: npm - name: Extract the version and commit body from the tag id: extract_release From 9b6df4eb680b456ee25c4e906141b152910b26c9 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Mon, 5 Jul 2021 15:48:49 +0200 Subject: [PATCH 26/35] fix weather test on days close to month change. --- test/integrationTests/weather_integration_tests.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integrationTests/weather_integration_tests.js b/test/integrationTests/weather_integration_tests.js index 8ee18cfc3..1f9f228ab 100644 --- a/test/integrationTests/weather_integration_tests.js +++ b/test/integrationTests/weather_integration_tests.js @@ -366,7 +366,8 @@ exports.runTests = function (getHarness) { entity => { const date = new Date(entity.attributes.forecast[6].datetime); const controlDate = new Date(newTS); - expect(date.getDate()).to.equal(controlDate.getDate() +6); + controlDate.setDate(controlDate.getDate() + 6); + expect(date.getDate()).to.equal(controlDate.getDate()); }); }); From 852cd8a2c40003e3a6aaa475b02e05d93102688a Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 8 Jul 2021 13:56:47 +0200 Subject: [PATCH 27/35] add generic maps to manual entities if they have common.states --- lib/server.js | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/lib/server.js b/lib/server.js index 7c7bcee7d..8c0eaaa38 100644 --- a/lib/server.js +++ b/lib/server.js @@ -174,7 +174,7 @@ class WebServer { [Types.image]: processImage, [Types.fireAlarm]: converterBinarySensors.processFireAlarm }; - + const concurrentPromises = [ this.adapter.getForeignObjectAsync('system.config') .then(config => { @@ -287,8 +287,8 @@ class WebServer { // ------------------------------- START OF CONVERTERS ---------------------------------------- // - _iobState2EntityState(id, val, type) { - type = type || entityData.iobID2entity[id][0].context.type; + _iobState2EntityState(entity, val, type) { + type = type || entity.context.type; const pos = type.lastIndexOf('.'); if (pos !== -1) { type = type.substring(pos + 1); @@ -305,6 +305,9 @@ class WebServer { } else if (typeof val === 'boolean') { return val ? 'on' : 'off'; + } else + if (typeof val === 'number' && entity.context.STATE.map2lovelace) { + return entity.context.STATE.map2lovelace[val] || val; } else { return val === null || val === undefined ? 'unknown' : val; } @@ -342,6 +345,14 @@ class WebServer { } entity.context.STATE = {getId: id, setId: id}; + if (obj && obj.common && obj.common.states) { + entity.context.STATE.map2lovelace = obj.common.states; + if (!(obj.common.states instanceof Array)) { + entity.context.STATE.map2iob = {}; + Object.keys(obj.common.states).forEach(k => entity.context.STATE.map2iob[obj.common.states[k]] = k); + } + } + utils.addID2entity(id, entity); if (custom.states && custom.states.stateRead) { entity.context.STATE.getId = custom.states.stateRead; @@ -397,7 +408,7 @@ class WebServer { } else if (entityType === 'input_boolean') { const state = await this.adapter.getForeignStateAsync(id); - entity.attributes.initial = this._iobState2EntityState(id, state ? state.val : undefined, entityType); + entity.attributes.initial = this._iobState2EntityState(entity, state ? state.val : undefined); } else if (entityType === 'input_select') { return converterInputSelect.processManualEntity(id, obj, entity, this._objectData.objects, custom); @@ -540,8 +551,15 @@ class WebServer { // set_operation_mode => service_data.operation_mode // set_temperature => service_data.temperature // set_speed => service_data.speed + let val = data.service_data[data.service.substring(4)]; + if (entity.context.STATE.map2iob) { + val = Number(entity.context.STATE.map2iob[val]); + if (!val && val !== 0) { + val = data.service_data[data.service.substring(4)]; //fallback if undefined. + } + } - this.adapter.setForeignState(id, data.service_data[data.service.substring(4)], false, {user}, () => + this.adapter.setForeignState(id, val, false, {user}, () => this._sendResponse(ws, data.id)); } else if (data.service === 'volume_mute') { @@ -555,8 +573,15 @@ class WebServer { this.log.debug(`${data.service}: ${id} = ${data.service_data[data.service.substring(7)]}`); // select_option => service_data.option // select_source => service_data.source + let val = data.service_data[data.service.substring(7)]; + if (entity.context.STATE.map2iob) { + val = Number(entity.context.STATE.map2iob[val]); + if (!val && val !== 0) { + val = data.service_data[data.service.substring(7)]; //fallback if undefined. + } + } - this.adapter.setForeignState(id, data.service_data[data.service.substring(7)], false, {user}, () => + this.adapter.setForeignState(id, val, false, {user}, () => this._sendResponse(ws, data.id)); } else if (data.service.endsWith('_say')) { this.adapter.setForeignState(id, data.service_data.message, false, {user}, () => { @@ -765,7 +790,7 @@ class WebServer { if (entity.context.STATE.getParser) { entity.context.STATE.getParser(entity, 'state', state); } else { - entity.state = this._iobState2EntityState(id, state.val); + entity.state = this._iobState2EntityState(entity, state.val); } } @@ -788,7 +813,7 @@ class WebServer { if (attr.getParser) { attr.getParser(entity, attr, state); } else { - utils.setJsonAttribute(entity.attributes, attr.attribute, this._iobState2EntityState(null, state.val, attr.attribute), this.log); + utils.setJsonAttribute(entity.attributes, attr.attribute, this._iobState2EntityState(entity, state.val, attr.attribute), this.log); } } } @@ -1891,7 +1916,7 @@ class WebServer { entity_id: entity.entity_id, state: typeof entity.context.STATE.historyParser === 'function' ? entity.context.STATE.historyParser(id, e.val).toString() : - this._iobState2EntityState(id, e.val).toString(), + this._iobState2EntityState(entity, e.val).toString(), last_changed: ts, last_updated: ts, attributes: getAttributeValues(ts, attributesResult) From a0e7ffcb974db693c2eefdc306db8a81c2f0616e Mon Sep 17 00:00:00 2001 From: Garfonso Date: Sat, 10 Jul 2021 23:08:43 +0200 Subject: [PATCH 28/35] add support for (new and old) fan --- lib/converters/fan.js | 136 ++++++++++++++++++++++++++++++++++++++++++ lib/server.js | 4 ++ 2 files changed, 140 insertions(+) create mode 100644 lib/converters/fan.js diff --git a/lib/converters/fan.js b/lib/converters/fan.js new file mode 100644 index 000000000..e2d1f9ed5 --- /dev/null +++ b/lib/converters/fan.js @@ -0,0 +1,136 @@ +const utils = require('./utils'); +const adapterData = require('./../dataSingleton'); + +async function fillEntityFromStates(states, objects, entity) { + //'old' fan: + // "modes": { + // "0": "off", + // "1": "low", + // "2": "medium", + // "3": "high" + // } + // -> use either states or this as default. + // 'new' fan: + // preset_mode instead of speed. Can support more modes... + // preset_mode -> will call set_preset_mode. + // support both, we don't care. + + + utils.fillEntityFromStates(states, entity); //already prefills attributes. + + //preset_mode is important: + if (states.preset_mode) { + const attr = entity.context.ATTRIBUTES.find(a => a.attribute === 'preset_mode'); + + const obj = objects[states.preset_mode] || {common: {type: 'number'}}; + if (!obj.common) { + obj.common = {type: 'number', states: {'0': 'off', '1': 'low', '2': 'medium', '3': 'high'}}; + } + if (!obj.common.type) { + obj.common.type = 'number'; + } + if (!obj.common.states) { + obj.common.states = {'0': 'off', '1': 'low', '2': 'medium', '3': 'high'}; + } + + if (obj.common.states) { + if (obj.common.states instanceof Array) { + attr.isStringArray = true; + entity.attributes.preset_modes = obj.common.states; + } else { + if (typeof obj.common.states === 'string') { + adapterData.log.warn(obj._id + ': states is of type string. Problems might occur. Please fix states to be of type object.'); + attr.map2lovelace = {}; + for (const kv of obj.common.states.split(';')) { + const [key, value] = kv.split(':'); + attr.map2lovelace[key] = value; + } + } else { + attr.map2lovelace = obj.common.states; + } + attr.isNumber = obj.common.type && obj.common.type.toLowerCase() === 'number'; + attr.map2iob = {}; + entity.attributes.preset_modes = []; + Object.keys(attr.map2lovelace).forEach(k => { + attr.map2iob[attr.map2lovelace[k]] = k; + entity.attributes.preset_modes.push(attr.map2lovelace[k]); + }); + } + } + + attr.getParser = (entity, attr, state) => { + state = state || {val: null}; + entity.attributes.speed = state.val || 'unknown'; + if (attr.map2lovelace) { + entity.attributes.speed = attr.map2lovelace[state.val] || state.val || 'unknown'; + } + entity.attributes.preset_mode = entity.attributes.speed; + entity.state = entity.attributes.speed !== 'off' ? 'on' : 'off'; + }; + + if (!entity.context.COMMANDS) { + entity.context.COMMANDS = []; + } + const parseCommand = async (entity, command, data, user) => { + let target = data.service_data.speed || data.service_data.preset_mode; + if (!attr.isStringArray) { + if (attr.map2iob) { + target = attr.map2iob[target]; + } + if (attr.isNumber) { + target = Number(target); + } + } + if (!target && target !== 0) { + target = data.service_data.speed || data.service_data.preset_mode; //fallback + } + + return adapterData.adapter.setForeignStateAsync(command.setId, target, false, {user}); + }; + + entity.context.COMMANDS.push({ + service: 'set_speed', + setId: states.preset_mode, + parseCommand + }); + entity.context.COMMANDS.push({ + service: 'set_preset_mode', + setId: states.preset_mode, + parseCommand + }); + entity.context.COMMANDS.push({ + service: 'turn_off', + setId: states.preset_mode, + parseCommand: async (entity, command, data, user) => { + await parseCommand(entity, command, {service_data: {preset_mode: 'off'}}, user); + if (states.state) { + await adapterData.adapter.setForeignStateAsync(states.state, false, false, {user}); + } + } + }); + } + + return [entity]; +} + +/** + * Create manual input_select entity. + * @param id - id of "main" object, i.e. state. + * @param obj - iobroker object of id param + * @param entity - already created entity + * @param objects - id object cache + * @param custom - custom part of object + * @returns {Promise<[entity]>} + */ +exports.processManualEntity = async function(id, obj, entity, objects, custom) { + const states = custom.states || { + preset_mode: id + }; + if (!states.preset_mode) { + states.speed = states.speed || id; + } + delete states.speed; //want only one attribute. + + + return fillEntityFromStates(states, objects, entity); +}; diff --git a/lib/server.js b/lib/server.js index 8c0eaaa38..5da0cf4a4 100644 --- a/lib/server.js +++ b/lib/server.js @@ -24,6 +24,7 @@ const processLocation = require('./converters/geo_location').processLocat const converterDatetime = require('./converters/input_datetime'); const converterAlarmCP = require('./converters/alarm_control_panel'); const converterInputSelect = require('./converters/input_select'); +const convertFan = require('./converters/fan'); const entityData = require('./dataSingleton'); const bindings = require('./bindings'); @@ -413,6 +414,9 @@ class WebServer { else if (entityType === 'input_select') { return converterInputSelect.processManualEntity(id, obj, entity, this._objectData.objects, custom); } + else if (entityType === 'fan') { + return convertFan.processManualEntity(id, obj, entity, this._objectData.objects, custom); + } else if (entityType === 'switch') { return converterSwitch.processManualEntity(id, obj, entity, this._objectData.objects, custom); } else if (entityType === 'timer') { From 9b3e09c44b14bf25af36f8a0cf905f07d2c34bac Mon Sep 17 00:00:00 2001 From: Garfonso Date: Mon, 19 Jul 2021 11:56:07 +0200 Subject: [PATCH 29/35] add input_datetime tests --- test/integrationTests/index.js | 5 + test/integrationTests/input_datetime_tests.js | 189 ++++++++++++++++++ test/testData/input_datetime_custom.json | 28 +++ 3 files changed, 222 insertions(+) create mode 100644 test/integrationTests/input_datetime_tests.js create mode 100644 test/testData/input_datetime_custom.json diff --git a/test/integrationTests/index.js b/test/integrationTests/index.js index 2a833c9b4..dd6344493 100644 --- a/test/integrationTests/index.js +++ b/test/integrationTests/index.js @@ -1,5 +1,6 @@ const binary_sensor_tests = require('./binary_sensor_integration_tests'); const climate_tests = require('./climate_integration_tests'); +const input_datetime_tests = require('./input_datetime_tests'); const input_select_tests = require('./input_select_tests'); const light_tests = require('./light_integration_tests'); const sensor_tests = require('./sensor_integration_tests'); @@ -21,6 +22,10 @@ exports.runTests = function (getHarness) { await climate_tests.runTests(getHarness); }); + describe('Test input_datetime', async () => { + await input_datetime_tests.runTests(getHarness); + }); + describe('Test input_select', async () => { await input_select_tests.runTests(getHarness); }); diff --git a/test/integrationTests/input_datetime_tests.js b/test/integrationTests/input_datetime_tests.js new file mode 100644 index 000000000..38cce87e8 --- /dev/null +++ b/test/integrationTests/input_datetime_tests.js @@ -0,0 +1,189 @@ +const tools = require('./testTools'); +const expect = require('chai').expect; + +exports.runTests = function (getHarness) { + it('input_datetime should be created and controllable', async () => { + // Create a fresh harness instance each test! + const harness = getHarness(); + + const objects = JSON.parse(JSON.stringify(require('../testData/input_datetime_custom.json'))); + const deviceId = 'adapter.0.input_datetime.custom_test'; + const deviceObj = objects[deviceId]; + const entities = await tools.startAndGetEntities(harness, objects, [], [{id: deviceId, val: 0}]); + + const entity = entities.find(e => e.context.id === deviceId); + expect(entity).to.be.ok; + tools.expectEntity(entity, 'input_datetime', deviceId, deviceObj.name); + + expect(entity).to.have.nested.property('attributes.has_time', true); + expect(entity).to.have.nested.property('attributes.has_date', true); + expect(entity).to.have.nested.property('attributes.year', 1970); + expect(entity).to.have.nested.property('attributes.month', 1); + expect(entity).to.have.nested.property('attributes.day', 1); + expect(entity).to.have.nested.property('attributes.hour', 0); + expect(entity).to.have.nested.property('attributes.minutes', '00'); + const now = new Date(); + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId, now.getTime(), true), + entity => { + expect(entity).to.have.nested.property('attributes.year', now.getFullYear()); + expect(entity).to.have.nested.property('attributes.month', now.getMonth() + 1); + expect(entity).to.have.nested.property('attributes.day', now.getDate()); + expect(entity).to.have.nested.property('attributes.hour', now.getHours()); + expect(entity).to.have.nested.property('attributes.minutes', (now.getMinutes() < 10 ? '0' : '') + now.getMinutes()); + }); + + console.log('Sending UI commands.'); + await tools.validateUIInput(harness, entity,m => { + m.domain = 'input_select'; m.service = 'set_datetime'; m.service_data = { date: '2021-07-19', time: '10:03'}; + }, deviceId, state => expect(state.val).to.equal(new Date(2021, 6, 19, 10, 3).getTime())); + }); + + it('input_datetime should ignore has_date false', async () => { + // Create a fresh harness instance each test! + const harness = getHarness(); + + const objects = JSON.parse(JSON.stringify(require('../testData/input_datetime_custom.json'))); + const deviceId = 'adapter.0.input_datetime.custom_test'; + const deviceObj = objects[deviceId]; + deviceObj.common.custom['lovelace.0'].has_date = false; + const entities = await tools.startAndGetEntities(harness, objects, [], [{id: deviceId, val: 0}]); + + const entity = entities.find(e => e.context.id === deviceId); + expect(entity).to.be.ok; + tools.expectEntity(entity, 'input_datetime', deviceId, deviceObj.name); + + expect(entity).to.have.nested.property('attributes.has_time', true); + expect(entity).to.have.nested.property('attributes.has_date', true); + }); + + it('input_datetime should ignore has_date true', async () => { + // Create a fresh harness instance each test! + const harness = getHarness(); + + const objects = JSON.parse(JSON.stringify(require('../testData/input_datetime_custom.json'))); + const deviceId = 'adapter.0.input_datetime.custom_test'; + const deviceObj = objects[deviceId]; + deviceObj.common.custom['lovelace.0'].has_date = true; + deviceObj.common.custom['lovelace.0'].attr_has_date = false; + const entities = await tools.startAndGetEntities(harness, objects, [], [{id: deviceId, val: 0}]); + + const entity = entities.find(e => e.context.id === deviceId); + expect(entity).to.be.ok; + tools.expectEntity(entity, 'input_datetime', deviceId, deviceObj.name); + + expect(entity).to.have.nested.property('attributes.has_time', true); + expect(entity).to.have.nested.property('attributes.has_date', false); + }); + + it('input_datetime should ignore has_time false', async () => { + // Create a fresh harness instance each test! + const harness = getHarness(); + + const objects = JSON.parse(JSON.stringify(require('../testData/input_datetime_custom.json'))); + const deviceId = 'adapter.0.input_datetime.custom_test'; + const deviceObj = objects[deviceId]; + deviceObj.common.custom['lovelace.0'].has_time = false; + deviceObj.common.custom['lovelace.0'].attr_has_time = true; + const entities = await tools.startAndGetEntities(harness, objects, [], [{id: deviceId, val: 0}]); + + const entity = entities.find(e => e.context.id === deviceId); + expect(entity).to.be.ok; + tools.expectEntity(entity, 'input_datetime', deviceId, deviceObj.name); + + expect(entity).to.have.nested.property('attributes.has_time', true); + expect(entity).to.have.nested.property('attributes.has_date', true); + }); + + it('input_datetime should ignore has_time true', async () => { + // Create a fresh harness instance each test! + const harness = getHarness(); + + const objects = JSON.parse(JSON.stringify(require('../testData/input_datetime_custom.json'))); + const deviceId = 'adapter.0.input_datetime.custom_test'; + const deviceObj = objects[deviceId]; + deviceObj.common.custom['lovelace.0'].has_time = true; + deviceObj.common.custom['lovelace.0'].attr_has_time = false; + const entities = await tools.startAndGetEntities(harness, objects, [], [{id: deviceId, val: 0}]); + + const entity = entities.find(e => e.context.id === deviceId); + expect(entity).to.be.ok; + tools.expectEntity(entity, 'input_datetime', deviceId, deviceObj.name); + + expect(entity).to.have.nested.property('attributes.has_time', false); + expect(entity).to.have.nested.property('attributes.has_date', true); + }); + + it('input_datetime should work without time', async () => { + // Create a fresh harness instance each test! + const harness = getHarness(); + + const objects = JSON.parse(JSON.stringify(require('../testData/input_datetime_custom.json'))); + const deviceId = 'adapter.0.input_datetime.custom_test'; + const deviceObj = objects[deviceId]; + deviceObj.common.custom['lovelace.0'].attr_has_time = false; + const entities = await tools.startAndGetEntities(harness, objects, [], [{id: deviceId, val: 0}]); + + const entity = entities.find(e => e.context.id === deviceId); + expect(entity).to.be.ok; + tools.expectEntity(entity, 'input_datetime', deviceId, deviceObj.name); + + expect(entity).to.have.nested.property('attributes.has_time', false); + expect(entity).to.have.nested.property('attributes.has_date', true); + expect(entity).to.have.nested.property('attributes.year', 1970); + expect(entity).to.have.nested.property('attributes.month', 1); + expect(entity).to.have.nested.property('attributes.day', 1); + expect(entity).to.not.have.nested.property('attributes.hour'); + expect(entity).to.not.have.nested.property('attributes.minutes'); + const now = new Date(); + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId, now.getTime(), true), + entity => { + expect(entity).to.have.nested.property('attributes.year', now.getFullYear()); + expect(entity).to.have.nested.property('attributes.month', now.getMonth() + 1); + expect(entity).to.have.nested.property('attributes.day', now.getDate()); + expect(entity).to.not.have.nested.property('attributes.hour'); + expect(entity).to.not.have.nested.property('attributes.minutes'); + }); + + console.log('Sending UI commands.'); + await tools.validateUIInput(harness, entity,m => { + m.domain = 'input_select'; m.service = 'set_datetime'; m.service_data = { date: '2021-07-19'}; + }, deviceId, state => expect(state.val).to.equal(new Date(2021, 6, 19).getTime())); + }); + + it('input_datetime should work without date', async () => { + // Create a fresh harness instance each test! + const harness = getHarness(); + + const objects = JSON.parse(JSON.stringify(require('../testData/input_datetime_custom.json'))); + const deviceId = 'adapter.0.input_datetime.custom_test'; + const deviceObj = objects[deviceId]; + deviceObj.common.custom['lovelace.0'].attr_has_date = false; + const entities = await tools.startAndGetEntities(harness, objects, [], [{id: deviceId, val: 0}]); + + const entity = entities.find(e => e.context.id === deviceId); + expect(entity).to.be.ok; + tools.expectEntity(entity, 'input_datetime', deviceId, deviceObj.name); + + expect(entity).to.have.nested.property('attributes.has_time', true); + expect(entity).to.have.nested.property('attributes.has_date', false); + expect(entity).to.not.have.nested.property('attributes.year'); + expect(entity).to.not.have.nested.property('attributes.month'); + expect(entity).to.not.have.nested.property('attributes.day'); + expect(entity).to.have.nested.property('attributes.hour', 0); + expect(entity).to.have.nested.property('attributes.minutes', '00'); + const now = new Date(); + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId, now.getTime(), true), + entity => { + expect(entity).to.have.nested.property('attributes.hour', now.getHours()); + expect(entity).to.have.nested.property('attributes.minutes', (now.getMinutes() < 10 ? '0' : '') + now.getMinutes()); + }); + + console.log('Sending UI commands.'); + await tools.validateUIInput(harness, entity,m => { + m.domain = 'input_select'; m.service = 'set_datetime'; m.service_data = { time: '9:31'}; + }, deviceId, state => expect(state.val).to.equal(new Date(now.getFullYear(), now.getMonth(), now.getDate(), 9, 31).getTime())); + }); +}; diff --git a/test/testData/input_datetime_custom.json b/test/testData/input_datetime_custom.json new file mode 100644 index 000000000..126a4ee02 --- /dev/null +++ b/test/testData/input_datetime_custom.json @@ -0,0 +1,28 @@ +{ + "adapter.0.input_datetime.custom_test": { + "common": { + "name": "Input Date Time", + "role": "time", + "type": "number", + "read": true, + "write": true, + "def": 0, + "custom": { + "lovelace.0": { + "enabled": true, + "entity": "input_datetime", + "name": "input_datetime_custom_test", + "has_date": true, + "has_time": true, + "attr_has_date": true, + "attr_has_time": true + } + } + }, + "type": "state", + "_id": "adapter.0.input_datetime.custom_test", + "from": "system.adapter.admin.0", + "user": "system.user.admin", + "ts": 1626687061052 + } +} From 35746dc3bcbbc82d00ad00a197607d9883b732d8 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 22 Jul 2021 12:03:01 +0200 Subject: [PATCH 30/35] make input_datetime accept has_time & has_date settings correctly. --- lib/converters/input_datetime.js | 12 +++++++-- test/integrationTests/input_datetime_tests.js | 26 ++++++++++--------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/lib/converters/input_datetime.js b/lib/converters/input_datetime.js index f1f7f13db..d33b2ae10 100644 --- a/lib/converters/input_datetime.js +++ b/lib/converters/input_datetime.js @@ -44,6 +44,8 @@ function fillEntityFromStates(states, objects, entity) { const parts = data.time.split(':'); date.setHours(parseInt(parts[0], 10)); date.setMinutes(parseInt(parts[1], 10)); + date.setSeconds(parts[2] ? parseInt(parts[2], 10) : 0); + date.setMilliseconds(0); } targetData = date.getTime(); } @@ -79,7 +81,13 @@ exports.processManualEntity = async function(id, obj, entity, objects, custom) { state: id }; - entity.attributes.has_time = custom.attr_has_time || false || (custom.attr_has_time === undefined && custom.attr_has_time); - entity.attributes.has_date = (custom.attr_has_date === undefined && custom.has_date === undefined) ? true : custom.attr_has_date || custom.has_date; //date on by default. + entity.attributes.has_time = custom.attr_has_time || false; + if (custom.attr_has_time === undefined) { + entity.attributes.has_time = custom.has_time || false; + } + entity.attributes.has_date = custom.attr_has_date; + if (custom.attr_has_date === undefined) { + entity.attributes.has_date = custom.has_date === undefined ? true : custom.has_date; //date on by default. + } return fillEntityFromStates(states, objects, entity); }; diff --git a/test/integrationTests/input_datetime_tests.js b/test/integrationTests/input_datetime_tests.js index 38cce87e8..0907bbf7a 100644 --- a/test/integrationTests/input_datetime_tests.js +++ b/test/integrationTests/input_datetime_tests.js @@ -15,13 +15,14 @@ exports.runTests = function (getHarness) { expect(entity).to.be.ok; tools.expectEntity(entity, 'input_datetime', deviceId, deviceObj.name); + const date0 = new Date(0); expect(entity).to.have.nested.property('attributes.has_time', true); expect(entity).to.have.nested.property('attributes.has_date', true); - expect(entity).to.have.nested.property('attributes.year', 1970); - expect(entity).to.have.nested.property('attributes.month', 1); - expect(entity).to.have.nested.property('attributes.day', 1); - expect(entity).to.have.nested.property('attributes.hour', 0); - expect(entity).to.have.nested.property('attributes.minutes', '00'); + expect(entity).to.have.nested.property('attributes.year', date0.getFullYear()); + expect(entity).to.have.nested.property('attributes.month', date0.getMonth() + 1); + expect(entity).to.have.nested.property('attributes.day', date0.getDate()); + expect(entity).to.have.nested.property('attributes.hour', date0.getHours()); + expect(entity).to.have.nested.property('attributes.minute', (date0.getMinutes() < 10 ? '0' : '') + date0.getMinutes()); const now = new Date(); await tools.validateStateChange(harness, entity.entity_id, async () => await harness.states.setStateAsync(deviceId, now.getTime(), true), @@ -30,7 +31,7 @@ exports.runTests = function (getHarness) { expect(entity).to.have.nested.property('attributes.month', now.getMonth() + 1); expect(entity).to.have.nested.property('attributes.day', now.getDate()); expect(entity).to.have.nested.property('attributes.hour', now.getHours()); - expect(entity).to.have.nested.property('attributes.minutes', (now.getMinutes() < 10 ? '0' : '') + now.getMinutes()); + expect(entity).to.have.nested.property('attributes.minute', (now.getMinutes() < 10 ? '0' : '') + now.getMinutes()); }); console.log('Sending UI commands.'); @@ -134,7 +135,7 @@ exports.runTests = function (getHarness) { expect(entity).to.have.nested.property('attributes.month', 1); expect(entity).to.have.nested.property('attributes.day', 1); expect(entity).to.not.have.nested.property('attributes.hour'); - expect(entity).to.not.have.nested.property('attributes.minutes'); + expect(entity).to.not.have.nested.property('attributes.minute'); const now = new Date(); await tools.validateStateChange(harness, entity.entity_id, async () => await harness.states.setStateAsync(deviceId, now.getTime(), true), @@ -143,13 +144,13 @@ exports.runTests = function (getHarness) { expect(entity).to.have.nested.property('attributes.month', now.getMonth() + 1); expect(entity).to.have.nested.property('attributes.day', now.getDate()); expect(entity).to.not.have.nested.property('attributes.hour'); - expect(entity).to.not.have.nested.property('attributes.minutes'); + expect(entity).to.not.have.nested.property('attributes.minute'); }); console.log('Sending UI commands.'); await tools.validateUIInput(harness, entity,m => { m.domain = 'input_select'; m.service = 'set_datetime'; m.service_data = { date: '2021-07-19'}; - }, deviceId, state => expect(state.val).to.equal(new Date(2021, 6, 19).getTime())); + }, deviceId, state => expect(state.val).to.equal(new Date('2021-07-19').getTime())); }); it('input_datetime should work without date', async () => { @@ -166,19 +167,20 @@ exports.runTests = function (getHarness) { expect(entity).to.be.ok; tools.expectEntity(entity, 'input_datetime', deviceId, deviceObj.name); + const date0 = new Date(0); expect(entity).to.have.nested.property('attributes.has_time', true); expect(entity).to.have.nested.property('attributes.has_date', false); expect(entity).to.not.have.nested.property('attributes.year'); expect(entity).to.not.have.nested.property('attributes.month'); expect(entity).to.not.have.nested.property('attributes.day'); - expect(entity).to.have.nested.property('attributes.hour', 0); - expect(entity).to.have.nested.property('attributes.minutes', '00'); + expect(entity).to.have.nested.property('attributes.hour', date0.getHours()); + expect(entity).to.have.nested.property('attributes.minute', (date0.getMinutes() < 10 ? '0' : '') + date0.getMinutes()); const now = new Date(); await tools.validateStateChange(harness, entity.entity_id, async () => await harness.states.setStateAsync(deviceId, now.getTime(), true), entity => { expect(entity).to.have.nested.property('attributes.hour', now.getHours()); - expect(entity).to.have.nested.property('attributes.minutes', (now.getMinutes() < 10 ? '0' : '') + now.getMinutes()); + expect(entity).to.have.nested.property('attributes.minute', (now.getMinutes() < 10 ? '0' : '') + now.getMinutes()); }); console.log('Sending UI commands.'); From 768f3bc2562864be7f53ddd1d5a1126334525cf0 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 22 Jul 2021 12:03:35 +0200 Subject: [PATCH 31/35] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 736c34706..65378dc86 100644 --- a/README.md +++ b/README.md @@ -468,6 +468,10 @@ After that checkout modified version in `./build` folder. Then. PLACEHOLDER for next version: ### **WORK IN PROGRESS** --> +### **WORK IN PROGRESS** +* (Garfonso) Add support for fan entity (makes fan card working). +* (Garfonso) fix backwards compatibility for input_datetime attributes. + ### 2.0.3 (2021-07-04) * (Garfonso) fix typo. From c938799fbb4e5dacd1a4247284a303c011670743 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 22 Jul 2021 12:03:45 +0200 Subject: [PATCH 32/35] dependencies --- package-lock.json | 260 +++++++++++++++++++++++++++------------------- package.json | 18 ++-- 2 files changed, 161 insertions(+), 117 deletions(-) diff --git a/package-lock.json b/package-lock.json index fcaae60ed..7dd730aa1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@alcalzone/release-script": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-2.1.0.tgz", - "integrity": "sha512-Y4Qihqp+ealxqfeN5NA91hRYndW2aywpT2AEKRVvecauKG7fMZ7BRz45gYLGImpS5ysVcRxTlIBc4VvdTpJtsQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-2.2.0.tgz", + "integrity": "sha512-fL9Gbvf9y4Kr+2KK4O1EWZlEnpV592D3nJ1cGpvOCb1fk4PyGt9eMtaxyIXLuaiJKw05mChEKKjQ8IdJfEUapw==", "dev": true, "requires": { "alcalzone-shared": "^4.0.0", @@ -46,9 +46,9 @@ } }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -396,9 +396,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", - "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", + "version": "7.14.8", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.8.tgz", + "integrity": "sha512-ZGy6/XQjllhYQrNw/3zfWRwZCTVSiBLZ9DHVZxn9n2gip/7ab8mv2TWlKPIBk26RwedCBoWdjLmn+t9na2Gcow==", "dev": true }, "@babel/helper-validator-option": { @@ -699,9 +699,9 @@ } }, "@eslint/eslintrc": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.2.tgz", - "integrity": "sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -716,9 +716,9 @@ }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -742,6 +742,40 @@ } } }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "dependencies": { + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, "@iobroker/adapter-core": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-2.5.0.tgz", @@ -1273,9 +1307,9 @@ "dev": true }, "@types/chai": { - "version": "4.2.19", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.19.tgz", - "integrity": "sha512-jRJgpRBuY+7izT7/WNXP/LsMO9YonsstuL+xuvycDyESpoDoIAsMd7suwpB4h9oEWB+ZlPTqJJ8EHomzNhwTPQ==", + "version": "4.2.21", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.21.tgz", + "integrity": "sha512-yd+9qKmJxm496BOV9CMNaey8TWsikaZOwMRwPHQIjcOJM9oV+fi9ZMNw3JsVnbEEbo2gRTDnGEBv8pjyn67hNg==", "dev": true }, "@types/chai-as-promised": { @@ -1294,9 +1328,9 @@ "dev": true }, "@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", "dev": true, "requires": { "@types/minimatch": "*", @@ -1304,9 +1338,9 @@ } }, "@types/glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@types/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha512-RHv6ZQjcTncXo3thYZrsbAVwoy4vSKosSWhuhuQxLOTv74OJuFQxXkmUuZCr3q9uNBEVCvIzmZL/FeRNbHZGUg==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@types/glob-stream/-/glob-stream-6.1.1.tgz", + "integrity": "sha512-AGOUTsTdbPkRS0qDeyeS+6KypmfVpbT5j23SN8UPG63qjKXNKjXn6V9wZUr8Fin0m9l8oGYaPK8b2WUMF8xI1A==", "dev": true, "requires": { "@types/glob": "*", @@ -1314,9 +1348,9 @@ } }, "@types/gulp": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-4.0.8.tgz", - "integrity": "sha512-RIhiptRwikdFMICikX+Kn8duKR4R7yO2CKMhkcIfvUwZ3UJSjHlvhHDJ2DsurJWETePqdjteO9MLRtObuCt7Sw==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-4.0.9.tgz", + "integrity": "sha512-zzT+wfQ8uwoXjDhRK9Zkmmk09/fbLLmN/yDHFizJiEKIve85qutOnXcP/TM2sKPBTU+Jc16vfPbOMkORMUBN7Q==", "dev": true, "requires": { "@types/undertaker": "*", @@ -1325,9 +1359,9 @@ }, "dependencies": { "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -1350,19 +1384,19 @@ } }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" } }, "fill-range": { @@ -1375,16 +1409,16 @@ } }, "fsevents": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz", - "integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "optional": true }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" @@ -1406,9 +1440,9 @@ "dev": true }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -1434,21 +1468,21 @@ } }, "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", "dev": true }, "@types/mocha": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.2.tgz", - "integrity": "sha512-Lwh0lzzqT5Pqh6z61P3c3P5nm6fzQK/MMHl9UKeneAeInVflBSz1O2EkX6gM6xfJd7FBXBY5purtLx7fUiZ7Hw==", + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", + "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", "dev": true }, "@types/node": { - "version": "15.12.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.5.tgz", - "integrity": "sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg==" + "version": "15.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.2.tgz", + "integrity": "sha512-dvMUE/m2LbXPwlvVuzCyslTEtQ2ZwuuFClDrOQ6mp2CenCg971719PTILZ4I6bTP27xfFFc+o7x2TkLuun/MPw==" }, "@types/proxyquire": { "version": "1.3.28", @@ -1487,9 +1521,9 @@ } }, "@types/undertaker": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@types/undertaker/-/undertaker-1.2.6.tgz", - "integrity": "sha512-sG5MRcsWRokQXtj94uCqPxReXldm4ZvXif34YthgHEpzipcBAFTg+4IoWFcvdA0hGM1KdpPj2efdzcD2pETqQA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/undertaker/-/undertaker-1.2.7.tgz", + "integrity": "sha512-xuY7nBwo1zSRoY2aitp/HArHfTulFAKql2Fr4b4mWbBBP+F50n7Jm6nwISTTMaDk2xvl92O10TTejVF0Q9mInw==", "dev": true, "requires": { "@types/node": "*", @@ -1504,9 +1538,9 @@ "dev": true }, "@types/vinyl": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.4.tgz", - "integrity": "sha512-2o6a2ixaVI2EbwBPg1QYLGQoHK56p/8X/sGfKbFC8N6sY9lfjsMf/GprtkQkSya0D4uRiutRZ2BWj7k3JvLsAQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.5.tgz", + "integrity": "sha512-1m6uReH8R/RuLVQGvTT/4LlWq67jZEUxp+FBHt0hYv2BT7TUwFbKI0wa7JZVEU/XtlcnX1QcTuZ36es4rGj7jg==", "dev": true, "requires": { "@types/expect": "^1.20.4", @@ -1514,9 +1548,9 @@ } }, "@types/vinyl-fs": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/@types/vinyl-fs/-/vinyl-fs-2.4.11.tgz", - "integrity": "sha512-2OzQSfIr9CqqWMGqmcERE6Hnd2KY3eBVtFaulVo3sJghplUcaeMdL9ZjEiljcQQeHjheWY9RlNmumjIAvsBNaA==", + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/@types/vinyl-fs/-/vinyl-fs-2.4.12.tgz", + "integrity": "sha512-LgBpYIWuuGsihnlF+OOWWz4ovwCYlT03gd3DuLwex50cYZLmX3yrW+sFF9ndtmh7zcZpS6Ri47PrIu+fV+sbXw==", "dev": true, "requires": { "@types/glob-stream": "*", @@ -1552,9 +1586,9 @@ "dev": true }, "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true }, "agent-base": { @@ -2925,13 +2959,14 @@ "dev": true }, "eslint": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.29.0.tgz", - "integrity": "sha512-82G/JToB9qIy/ArBzIWG9xvvwL3R86AlCjtGw+A29OMZDqhTybz/MByORSukGxeI+YPCR4coYyITKk8BFH9nDA==", + "version": "7.31.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.31.0.tgz", + "integrity": "sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.2", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -2978,9 +3013,9 @@ "dev": true }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, "requires": { "ms": "2.1.2" @@ -3507,9 +3542,9 @@ } }, "flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.1.tgz", + "integrity": "sha512-OMQjaErSFHmHqZe+PSidH5n8j3O0F2DdnVh8JB4j4eUQ2k6KvB0qGfrKIhapvez5JerBbmWkaLYUYWISaESoXg==", "dev": true }, "flush-write-stream": { @@ -4373,9 +4408,9 @@ } }, "globals": { - "version": "13.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.9.0.tgz", - "integrity": "sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==", + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.10.0.tgz", + "integrity": "sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -4662,9 +4697,9 @@ "dev": true }, "iobroker.type-detector": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/iobroker.type-detector/-/iobroker.type-detector-1.0.14.tgz", - "integrity": "sha512-RCfAeuHGx0zAf7LlRiDGWIyE2p6eEqisrkkcaV+zk47ScxH8QtV1X1yHUi33L62gcU3MNkmxMswGD29HHdDsnQ==" + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/iobroker.type-detector/-/iobroker.type-detector-1.0.15.tgz", + "integrity": "sha512-D9yENywf+fAvt+jn6YHQIPQpbTwKjiemis/8tN9DYYY+aI3lR1RUgd8hwDm8slREG6oFJPzGZBpOKs+vixABgg==" }, "ioredis": { "version": "4.27.6", @@ -5513,15 +5548,15 @@ } }, "mocha": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.0.1.tgz", - "integrity": "sha512-9zwsavlRO+5csZu6iRtl3GHImAbhERoDsZwdRkdJ/bE+eVplmoxNKE901ZJ9LdSchYBjSCPbjKc5XvcAri2ylw==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.0.2.tgz", + "integrity": "sha512-FpspiWU+UT9Sixx/wKimvnpkeW0mh6ROAKkIaPokj3xZgxeRhcna/k5X57jJghEr8X+Cgu/Vegf8zCX5ugSuTA==", "dev": true, "requires": { "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", - "chokidar": "3.5.1", + "chokidar": "3.5.2", "debug": "4.3.1", "diff": "5.0.0", "escape-string-regexp": "4.0.0", @@ -5534,12 +5569,12 @@ "minimatch": "3.0.4", "ms": "2.1.3", "nanoid": "3.1.23", - "serialize-javascript": "5.0.1", + "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", "which": "2.0.2", "wide-align": "1.1.3", - "workerpool": "6.1.4", + "workerpool": "6.1.5", "yargs": "16.2.0", "yargs-parser": "20.2.4", "yargs-unparser": "2.0.0" @@ -5583,19 +5618,19 @@ } }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" } }, "cliui": { @@ -5721,14 +5756,23 @@ "dev": true }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" } }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "string-width": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", @@ -7590,9 +7634,9 @@ }, "dependencies": { "ajv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.0.tgz", - "integrity": "sha512-cnUG4NSBiM4YFBxgZIj/In3/6KX+rQ2l2YPRVcvAMQGWEPKuXoPIhxzwqh31jA3IPbI4qEOp/5ILI4ynioXsGQ==", + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -8170,9 +8214,9 @@ "dev": true }, "workerpool": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.4.tgz", - "integrity": "sha512-jGWPzsUqzkow8HoAvqaPWTUPCrlPJaJ5tY8Iz7n1uCz3tTp6s3CDG0FF1NsX42WNlkRSW6Mr+CDZGnNoSsKa7g==", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", + "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==", "dev": true }, "wrap-ansi": { @@ -8202,9 +8246,9 @@ } }, "ws": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.1.tgz", - "integrity": "sha512-2c6faOUH/nhoQN6abwMloF7Iyl0ZS2E9HGtsiLrWn0zOOMWlhtDmdf/uihDt6jnuCxgtwGBNy6Onsoy2s2O2Ow==" + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", + "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==" }, "xtend": { "version": "4.0.2", diff --git a/package.json b/package.json index ed0fd38c5..7eb960c71 100644 --- a/package.json +++ b/package.json @@ -23,31 +23,31 @@ "axios": "^0.21.1", "body-parser": "^1.19.0", "express": "^4.17.1", - "iobroker.type-detector": "^1.0.14", + "iobroker.type-detector": "^1.0.15", "js-yaml": "^4.1.0", "jstimezonedetect": "^1.0.7", "mime": "^2.5.2", "multer": "^1.4.2", "nyc": "^15.1.0", "pinyin": "^2.10.2", - "ws": "^7.5.1" + "ws": "^7.5.3" }, "devDependencies": { - "@alcalzone/release-script": "^2.1.0", + "@alcalzone/release-script": "^2.2.0", "@iobroker/testing": "^2.4.4", - "@types/chai": "^4.2.19", + "@types/chai": "^4.2.21", "@types/chai-as-promised": "^7.1.4", - "@types/gulp": "^4.0.8", - "@types/mocha": "^8.2.2", - "@types/node": "^15.12.5", + "@types/gulp": "^4.0.9", + "@types/mocha": "^8.2.3", + "@types/node": "^15.14.2", "@types/proxyquire": "^1.3.28", "@types/sinon": "^10.0.2", "@types/sinon-chai": "^3.2.5", "chai": "^4.3.4", "chai-as-promised": "^7.1.1", - "eslint": "^7.29.0", + "eslint": "^7.31.0", "gulp": "^4.0.2", - "mocha": "^9.0.1", + "mocha": "^9.0.2", "proxyquire": "^2.1.3", "sinon": "^11.1.1", "sinon-chai": "^3.7.0" From 2749718202e428b46d9fea42a399f129bbe7276a Mon Sep 17 00:00:00 2001 From: Garfonso Date: Thu, 22 Jul 2021 13:15:44 +0200 Subject: [PATCH 33/35] weather: add precipitation and precipitation_chance to attributes --- lib/converters/weather.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/converters/weather.js b/lib/converters/weather.js index c36c0bf20..85a4f6a78 100644 --- a/lib/converters/weather.js +++ b/lib/converters/weather.js @@ -67,6 +67,18 @@ exports.processWeather = function (id, control, name, room, func, _obj, objects, utils.addID2entity(state.id, entity); } + state = control.states.find(s => s.id && s.name === 'PRECIPITATION_CHANCE'); + if (state && state.id) { + entity.context.ATTRIBUTES.push({attribute: `precipitation_probability`, getId: state.id}); + utils.addID2entity(state.id, entity); + } + + state = control.states.find(s => s.id && s.name === 'PRECIPITATION'); + if (state && state.id) { + entity.context.ATTRIBUTES.push({attribute: `precipitation`, getId: state.id}); + utils.addID2entity(state.id, entity); + } + // forecast {datetime: something for new Date(aa), temperature, templow, condition(see STATE), precipitation} // day 0 let somethingFound; From b180c24a0e963bf78e872d9085f39f8611a391ee Mon Sep 17 00:00:00 2001 From: Garfonso Date: Fri, 23 Jul 2021 14:44:54 +0200 Subject: [PATCH 34/35] fix climate mode if power state is present and mode is updated without power --- lib/converters/climate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/converters/climate.js b/lib/converters/climate.js index 70e091539..4a89e365a 100644 --- a/lib/converters/climate.js +++ b/lib/converters/climate.js @@ -288,8 +288,8 @@ function fillClimateEntityFromStates(states, objects, entity, iobType) { state = state || {val: null}; entity.context.iobMode = state.val; entity.attributes.hvac_mode = attr.iobToLovelace[state.val] || state.val; - if (!state.val && ((states.state || states.stateRead) && entity.state === 'off')) { - entity.attributes.hvac_mode = entity.state; + if (!entity.context.iobPower && ((states.state || states.stateRead) && entity.state === 'off')) { + entity.attributes.hvac_mode = entity.state; //stay in off mode, if power mode and power is off. } else { entity.state = entity.attributes.hvac_mode; } From 74b73fe117fae91b046e34bf7e594ab0ba9b2188 Mon Sep 17 00:00:00 2001 From: Garfonso Date: Fri, 23 Jul 2021 15:05:52 +0200 Subject: [PATCH 35/35] update readme & add test --- README.md | 1 + .../climate_integration_tests.js | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/README.md b/README.md index 65378dc86..730312d43 100644 --- a/README.md +++ b/README.md @@ -471,6 +471,7 @@ After that checkout modified version in `./build` folder. Then. ### **WORK IN PROGRESS** * (Garfonso) Add support for fan entity (makes fan card working). * (Garfonso) fix backwards compatibility for input_datetime attributes. +* (Garfonso) fix airconditioner with power mode on mode update ### 2.0.3 (2021-07-04) * (Garfonso) fix typo. diff --git a/test/integrationTests/climate_integration_tests.js b/test/integrationTests/climate_integration_tests.js index 940ca38b1..29b430555 100644 --- a/test/integrationTests/climate_integration_tests.js +++ b/test/integrationTests/climate_integration_tests.js @@ -725,5 +725,36 @@ exports.runTests = function (getHarness) { m.domain = 'climate'; m.service = 'set_swing_mode'; m.service_data = {swing_mode: 'off'}; }, deviceId + '.swing', state => expect(state.val).to.be.false); }); + + it('should stay off if power is off and mode changes but should set right mode if power comes on', async () => { + // Create a fresh harness instance each test! + const harness = getHarness(); + + const objects = JSON.parse(JSON.stringify(require('../testData/climate_aircondition_full.json'))); + const deviceId = 'adapter.0.aircondition.Full'; + const deviceObj = objects[deviceId]; + const entities = await tools.startAndGetEntities(harness, objects, [deviceId], [{id: deviceId + '.mode', val: 1}, {id: deviceId + '.power', val: false}]); + + const entity = entities.find(e => e.context.id === deviceId); + expect(entity).to.be.ok; + tools.expectEntity(entity, 'climate', deviceId, deviceObj.name); + + expect(entity).to.have.property('state', 'off'); + expect(entity).to.have.nested.property('attributes.hvac_mode', 'off'); + //stay off! + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId + '.mode', 2, true), + entity => { + expect(entity).to.have.property('state', 'off'); + expect(entity).to.have.nested.property('attributes.hvac_mode', 'off'); + }); + //set right mode, if on again. + await tools.validateStateChange(harness, entity.entity_id, + async () => await harness.states.setStateAsync(deviceId + '.power', true, true), + entity => + { + expect(entity).to.have.nested.property('attributes.hvac_mode', 'heat'); + }); + }); }); };