Skip to content

Commit

Permalink
chore: release v3.7.0
Browse files Browse the repository at this point in the history
* (foxriver76) support software sensor `CLIPGenericFlag` (closes #328)
  • Loading branch information
foxriver76 committed May 30, 2022
1 parent b85665c commit 941bcd2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
26 changes: 13 additions & 13 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -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)",
Expand Down Expand Up @@ -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": {
Expand Down
11 changes: 7 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {};
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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, '');
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"contributors": [
Expand Down

0 comments on commit 941bcd2

Please sign in to comment.