Skip to content

Commit

Permalink
Merge pull request #413 from mattreim/objects
Browse files Browse the repository at this point in the history
Add objects and roles
  • Loading branch information
Jey-Cee authored Nov 3, 2024
2 parents d751264 + 2e3114a commit ccd81d2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ class deconz extends utils.Adapter {
case "offset":
case "pulseconfiguration":
case "resetpresence":
case "schedule_on":
case "setvalve":
case "sensitivity":
case "speed":
Expand All @@ -316,6 +317,7 @@ class deconz extends utils.Adapter {
case "fanmode":
case "mode":
case "preset":
case "schedule":
case "swingmode":
case "triggerdistance":
parameters = `{ "${dp}": "${state.val}" }`;
Expand Down Expand Up @@ -2694,7 +2696,7 @@ async function SetObjectAndState(id, name, type, stateName, value) {
break;
case "fanmode":
objType = "string";
objRole = "state";
objRole = "level.mode.fan";
objDefault = "auto";
objStates = {
off: "off",
Expand Down Expand Up @@ -2733,6 +2735,7 @@ async function SetObjectAndState(id, name, type, stateName, value) {
case "group":
objType = "number";
objRole = "state";
objWrite = false;
value = parseInt(value);
break;
case "heatsetpoint":
Expand Down Expand Up @@ -2922,7 +2925,7 @@ async function SetObjectAndState(id, name, type, stateName, value) {
break;
case "preset":
objType = "string";
objRole = "state";
objRole = "level.mode.thermostat";
objDefault = "manual";
objStates = {
holiday: "holiday",
Expand Down Expand Up @@ -2963,6 +2966,10 @@ async function SetObjectAndState(id, name, type, stateName, value) {
objDefault = "{}";
value = JSON.stringify(value);
break;
case "schedule_on":
objType = "boolean";
objRole = "switch";
break;
case "scheduler":
objType = "string";
objRole = "state";
Expand Down

0 comments on commit ccd81d2

Please sign in to comment.