From 941bcd2a1ada55774fb0d46da00592c91d38df6d Mon Sep 17 00:00:00 2001 From: Moritz Heusinger Date: Mon, 30 May 2022 09:24:32 +0200 Subject: [PATCH] chore: release v3.7.0 * (foxriver76) support software sensor `CLIPGenericFlag` (closes #328) --- README.md | 3 +++ io-package.json | 26 +++++++++++++------------- main.js | 11 +++++++---- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index fae55174..89b4e1d2 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,9 @@ In den Adapter-Settings muss die IP der Hue Bridge sowie ein Username konfigurie Placeholder for the next version (at the beginning of the line): ### __WORK IN PROGRESS__ --> +### 3.7.0 (2022-05-30) +* (foxriver76) support software sensor `CLIPGenericFlag` (closes #328) + ### 3.6.5 (2022-01-11) * (foxriver76) correctly identify third party switches (closes #273) diff --git a/io-package.json b/io-package.json index 11c8e817..548f0581 100644 --- a/io-package.json +++ b/io-package.json @@ -1,9 +1,21 @@ { "common": { "name": "hue", - "version": "3.6.5", + "version": "3.7.0", "tier": 2, "news": { + "3.7.0": { + "en": "support software sensor `CLIPGenericFlag` (closes #328)", + "de": "Support-Software-Sensor `CLIPGenericFlag` (schließt #328)", + "ru": "датчик поддержки программного обеспечения `CLIPGenericFlag` (закрывает #328)", + "pt": "sensor de software de suporte `CLIPGenericFlag` (fecha #328)", + "nl": "ondersteuningssoftware sensor `CLIPGenericFlag` (sluit #328)", + "fr": "prend en charge le capteur logiciel `CLIPGenericFlag` (ferme #328)", + "it": "supporto software sensore `CLIPGenericFlag` (chiude #328)", + "es": "sensor de software de soporte `CLIPGenericFlag` (cierra #328)", + "pl": "obsługa czujnika oprogramowania `CLIPGenericFlag` (zamyka #328)", + "zh-cn": "支持软件传感器“CLIPGenericFlag”(关闭#328)" + }, "3.6.5": { "en": "correctly identify third party switches (closes #273)", "de": "Schalter von Drittanbietern richtig identifizieren (schließt #273)", @@ -75,18 +87,6 @@ "es": "Corrección del valor ct de # 234 portado para el grupo 0 (Todos)", "pl": "Ustalona wartość ct z #234 przeniesiona dla grupy 0 (Wszystkie)", "zh-cn": "为 0(所有)组移植的 #234 的 ct 值修复" - }, - "3.5.30": { - "en": "we fixed Sentry IOBROKER-HUE-1K, IOBROKER-HUE-A, IOBROKER-HUE-1J", - "de": "wir reparierten Sentry IOBROKER-HUE-1K, IOBROKER-HUE-A, IOBROKER-HUE-1J", - "ru": "мы исправили Sentry IOBROKER-HUE-1K, IOBROKER-HUE-A, IOBROKER-HUE-1J", - "pt": "consertamos Sentinela IOBROKER-HUE-1K, IOBROKER-HUE-A, IOBROKER-HUE-1J", - "nl": "we hebben Sentry IOBROKER-HUE-1K, IOBROKER-HUE-A, IOBROKER-HUE-1J gerepareerd", - "fr": "nous avons corrigé Sentry IOBROKER-HUE-1K, IOBROKER-HUE-A, IOBROKER-HUE-1J", - "it": "abbiamo riparato Sentry IOBROKER-HUE-1K, IOBROKER-HUE-A, IOBROKER-HUE-1J", - "es": "arreglamos Sentry IOBROKER-HUE-1K, IOBROKER-HUE-A, IOBROKER-HUE-1J", - "pl": "naprawiliśmy Sentry IOBROKER-HUE-1K, IOBROKER-HUE-A, IOBROKER-HUE-1J", - "zh-cn": "我们修复了 Sentry IOBROKER-HUE-1K、IOBROKER-HUE-A、IOBROKER-HUE-1J" } }, "titleLang": { diff --git a/main.js b/main.js index e9b8b6ff..9a99c819 100644 --- a/main.js +++ b/main.js @@ -24,7 +24,8 @@ let adapter; let pollingInterval; let reconnectTimeout; -const supportedSensors = ['ZLLSwitch', 'ZGPSwitch', 'Daylight', 'ZLLTemperature', 'ZLLPresence', 'ZLLLightLevel']; +const SUPPORTED_SENSORS = ['ZLLSwitch', 'ZGPSwitch', 'Daylight', 'ZLLTemperature', 'ZLLPresence', 'ZLLLightLevel']; +const SOFTWARE_SENSORS = ['CLIPGenericStatus', 'CLIPGenericFlag']; function startAdapter(options) { options = options || {}; @@ -65,7 +66,7 @@ function startAdapter(options) { return; } - if (channelObj && channelObj.common && supportedSensors.includes(channelObj.common.role)) { + if (channelObj && channelObj.common && SUPPORTED_SENSORS.includes(channelObj.common.role)) { // its a sensor - we support turning it on and off try { if (dp === 'on') { @@ -962,7 +963,7 @@ async function connect() { for (const sid of sensorsArr) { const sensor = sensors[sid]; - if (supportedSensors.includes(sensor.type)) { + if (SUPPORTED_SENSORS.includes(sensor.type)) { let channelName = adapter.config.useLegacyStructure ? `${config.config.name.replace(/\./g, '_')}.${sensor.name.replace(adapter.FORBIDDEN_CHARS, '')}` : sensor.name.replace(adapter.FORBIDDEN_CHARS, ''); @@ -2161,7 +2162,9 @@ async function main() { adapter.config.port = adapter.config.port ? parseInt(adapter.config.port, 10) : 80; if (adapter.config.syncSoftwareSensors) { - supportedSensors.push('CLIPGenericStatus'); + for (const softwareSensor of SOFTWARE_SENSORS) { + SUPPORTED_SENSORS.push(softwareSensor); + } } // endIf // polling interval has to be greater equal 1 diff --git a/package-lock.json b/package-lock.json index fc569e23..6657d84f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "iobroker.hue", - "version": "3.6.5", + "version": "3.7.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5436a09f..9276d6bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.hue", - "version": "3.6.5", + "version": "3.7.0", "description": "Connects Philips Hue LED Bulbs, Friends of Hue LED Lamps and Stripes and other SmartLink capable Devices (LivingWhites, some LivingColors) via Philips Hue Bridges", "author": "hobbyquaker ", "contributors": [