Skip to content

Commit

Permalink
Add more min/max values
Browse files Browse the repository at this point in the history
  • Loading branch information
mattreim authored Feb 20, 2024
1 parent 44172e9 commit 4d2c936
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,14 @@ class deconz extends utils.Adapter {
}
break;
case "colorspeed":
let effect = await this.getStateAsync(
this.name + "." + this.instance + "." + id + ".effect"
);
let effect = await this.getStateAsync(this.name + "." + this.instance + "." + id + ".effect");
if (effect && effect.val === "colorloop") {
parameters = '{"colorloopspeed": ' + state.val + ', "effect": "colorloop"}';
}
break;
case "effect":
if (state.val === "colorloop") {
const speed = await this.getStateAsync(
this.name + "." + this.instance + "." + id + ".colorspeed"
);
const speed = await this.getStateAsync(this.name + "." + this.instance + "." + id + ".colorspeed");
if (speed.val === null || speed.val === undefined) {
speed.val = 1;
}
Expand Down Expand Up @@ -231,9 +227,7 @@ class deconz extends utils.Adapter {
case "dimup":
case "dimdown":
oid;
let dimspeed = await this.getStateAsync(
this.name + "." + this.instance + "." + id + ".dimspeed"
);
let dimspeed = await this.getStateAsync(this.name + "." + this.instance + "." + id + ".dimspeed");

if (dimspeed === null || dimspeed === undefined || dimspeed.val === 0)
{
Expand Down Expand Up @@ -2560,6 +2554,8 @@ async function SetObjectAndState(id, name, type, stateName, value) {
case "coolsetpoint":
objType = "number";
objRole = "level.temperature";
objMin = 700;
objMax = 3500;
objDefault = 0;
objUnit = "°C";
value = value / 100;
Expand Down Expand Up @@ -2686,6 +2682,8 @@ async function SetObjectAndState(id, name, type, stateName, value) {
case "externalsensortemp":
objType = "number";
objRole = "level.temperature";
objMin = -32768;
objMax = 32767;
objDefault = 0;
objUnit = "°C";
value = value / 100;
Expand Down Expand Up @@ -2732,6 +2730,8 @@ async function SetObjectAndState(id, name, type, stateName, value) {
case "heatsetpoint":
objType = "number";
objRole = "level.temperature";
objMin = 500;
objMax = 3200;
objDefault = 20.0;
objUnit = "°C";
value = value / 100;
Expand Down

0 comments on commit 4d2c936

Please sign in to comment.