Skip to content

Commit

Permalink
chore: release v3.5.19
Browse files Browse the repository at this point in the history
fix crash case if we cannot get min/max ct values
  • Loading branch information
foxriver76 committed Jun 2, 2021
1 parent 34debd5 commit 20c46db
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ 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.5.19 (2021-06-02)
* (foxriver76) fix crash case if we cannot get min/max ct values

### 3.5.18 (2021-06-01)
* (foxriver76) get the correct min/max ct values from api for lights (closes #192)
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.5.18",
"version": "3.5.19",
"tier": 2,
"news": {
"3.5.19": {
"en": "fix crash case if we cannot get min/max ct values",
"de": "Crash-Fall beheben, wenn wir keine Min/Max-CT-Werte erhalten können",
"ru": "исправить случай сбоя, если мы не можем получить минимальные / максимальные значения ct",
"pt": "consertar o caso de falha se não conseguirmos obter os valores min / max ct",
"nl": "crashgeval repareren als we geen min/max ct-waarden kunnen krijgen",
"fr": "corriger le cas de plantage si nous ne pouvons pas obtenir les valeurs min/max ct",
"it": "risolvere il caso di arresto anomalo se non riusciamo a ottenere i valori ct min/max",
"es": "arreglar caso de falla si no podemos obtener valores mínimos / máximos de ct",
"pl": "napraw przypadek awarii, jeśli nie możemy uzyskać wartości min/max ct",
"zh-cn": "如果我们无法获得最小/最大 ct 值,则修复崩溃案例"
},
"3.5.18": {
"en": "get the correct min/max ct values from api for lights (closes #192)",
"de": "Holen Sie sich die richtigen Min / Max-Ct-Werte von der API für Lichter (schließt # 192)",
Expand Down Expand Up @@ -231,18 +243,6 @@
"es": "ya no establecemos estados de estados no existentes",
"pl": "nie stawiamy już stanów nieistniejących stanów",
"zh-cn": "我们不再设置不存在状态的状态"
},
"3.3.8": {
"en": "marked read-only states accordingly",
"de": "schreibgeschützte Zustände entsprechend markiert",
"ru": "отмечены состояния только для чтения соответственно",
"pt": "marcado como somente leitura de acordo",
"nl": "gemarkeerd als alleen-lezen staten dienovereenkomstig",
"fr": "États en lecture seule marqués en conséquence",
"it": "contrassegnato di conseguenza gli stati di sola lettura",
"es": "marcados estados de solo lectura en consecuencia",
"pl": "oznaczone odpowiednio jako tylko do odczytu",
"zh-cn": "标记为只读状态"
}
},
"titleLang": {
Expand Down
11 changes: 8 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1160,9 +1160,14 @@ async function connect() {
lobj.common.role = 'level.color.xy';
break;
case 'ct': {
const light = await api.lights.getLight(parseInt(lid));
// often max: 454 or 500, min: 153
const ctObj = light._populationData.capabilities.control.ct;
let ctObj = {min: 153, max: 500}; // fallback object
try {
const light = await api.lights.getLight(parseInt(lid));
// often max: 454 or 500, min: 153
ctObj = light._populationData.capabilities.control.ct;
} catch {
// ignore
}
lobj.common.type = 'number';
lobj.common.role = 'level.color.temperature';
lobj.common.unit = '°K';
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.5.18",
"version": "3.5.19",
"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 20c46db

Please sign in to comment.