smart-nodes 0.4.16-beta → 0.4.17-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -140,7 +140,6 @@
|
|
|
140
140
|
name: { value: "" },
|
|
141
141
|
exec_text_names: { value: "" },
|
|
142
142
|
data_type: { value: "SIMPLE" }, // SIMPLE || HOMEASSISTANT
|
|
143
|
-
outputs: { value: 3 },
|
|
144
143
|
max_time: { value: 60 },
|
|
145
144
|
max_time_up: { value: 60 },
|
|
146
145
|
max_time_down: { value: 60 },
|
|
@@ -156,7 +155,7 @@
|
|
|
156
155
|
if (this.data_type == "SIMPLE")
|
|
157
156
|
return ["Up", "Down", "Status Position"][index];
|
|
158
157
|
|
|
159
|
-
return ["HA
|
|
158
|
+
return ["HA Up", "HA Down", "HA Status Position"][index];
|
|
160
159
|
},
|
|
161
160
|
icon: "font-awesome/fa-align-justify",
|
|
162
161
|
label: function ()
|
|
@@ -181,9 +180,6 @@
|
|
|
181
180
|
{ value: "HOMEASSISTANT", label: node._("shutter.ui.home_assistant") }
|
|
182
181
|
],
|
|
183
182
|
}],
|
|
184
|
-
}).on("change", function (event, type, value)
|
|
185
|
-
{
|
|
186
|
-
node.outputs = value == "SIMPLE" ? 3 : 2;
|
|
187
183
|
});
|
|
188
184
|
|
|
189
185
|
$("#node-input-max_time_up")
|
|
@@ -572,7 +572,7 @@ module.exports = function (RED)
|
|
|
572
572
|
break;
|
|
573
573
|
|
|
574
574
|
case "HOMEASSISTANT":
|
|
575
|
-
data = [{ payload: { action: "
|
|
575
|
+
data = [{ payload: { action: "homeassistant.turn_on" } }, { payload: { action: "homeassistant.turn_off" } }, { payload: { action: "number.set_value", data: { "value": node_settings.last_position } } }];
|
|
576
576
|
break;
|
|
577
577
|
|
|
578
578
|
default:
|
|
@@ -596,7 +596,7 @@ module.exports = function (RED)
|
|
|
596
596
|
break;
|
|
597
597
|
|
|
598
598
|
case "HOMEASSISTANT":
|
|
599
|
-
data = [{ payload: { action: "
|
|
599
|
+
data = [{ payload: { action: "homeassistant.turn_off" } }, { payload: { action: "homeassistant.turn_on" } }, { payload: { action: "number.set_value", data: { "value": node_settings.last_position } } }];
|
|
600
600
|
break;
|
|
601
601
|
|
|
602
602
|
default:
|
|
@@ -620,7 +620,7 @@ module.exports = function (RED)
|
|
|
620
620
|
break;
|
|
621
621
|
|
|
622
622
|
case "HOMEASSISTANT":
|
|
623
|
-
data = [{ payload: { action: "
|
|
623
|
+
data = [{ payload: { action: "homeassistant.turn_off" } }, { payload: { action: "homeassistant.turn_off" } }, { payload: { action: "number.set_value", data: { "value": node_settings.last_position } } }];
|
|
624
624
|
break;
|
|
625
625
|
|
|
626
626
|
default:
|
|
@@ -645,7 +645,7 @@ module.exports = function (RED)
|
|
|
645
645
|
break;
|
|
646
646
|
|
|
647
647
|
case "HOMEASSISTANT":
|
|
648
|
-
data = [null, { payload: { action: "number.set_value", data: { "value": node_settings.last_position } } }];
|
|
648
|
+
data = [null, null, { payload: { action: "number.set_value", data: { "value": node_settings.last_position } } }];
|
|
649
649
|
break;
|
|
650
650
|
|
|
651
651
|
default:
|