diff --git a/node_red_diele_nachtbeleuchtung.json b/node_red_diele_nachtbeleuchtung.json index ea27278..1973547 100644 --- a/node_red_diele_nachtbeleuchtung.json +++ b/node_red_diele_nachtbeleuchtung.json @@ -15,11 +15,13 @@ "5b5ec57984037a5c", "f0c5e4339b494c3a", "43d024d394d94663", - "00b3ef7322366374" + "00b3ef7322366374", + "87806c641c86c3d9", + "14c3a212afc4cd78" ], "x": 14, "y": 419, - "w": 1152, + "w": 1412, "h": 142 }, { @@ -141,7 +143,7 @@ "endTime": "08:00", "startOffset": 0, "endOffset": 0, - "x": 720, + "x": 800, "y": 460, "wires": [ [ @@ -177,7 +179,7 @@ "blockInputOverrides": false, "domain": "light", "service": "turn_on", - "x": 1010, + "x": 1270, "y": 460, "wires": [ [] @@ -210,7 +212,7 @@ "blockInputOverrides": false, "domain": "light", "service": "turn_off", - "x": 1010, + "x": 1270, "y": 520, "wires": [ [] @@ -222,7 +224,7 @@ "z": "a1055886e0cbd337", "g": "23b8f90b282ac8a2", "name": "", - "pauseType": "delay", + "pauseType": "delayv", "timeout": "3", "timeoutUnits": "minutes", "rate": "1", @@ -234,7 +236,7 @@ "drop": false, "allowrate": false, "outputs": 1, - "x": 720, + "x": 1020, "y": 520, "wires": [ [ @@ -254,13 +256,79 @@ "endTime": "08:00", "startOffset": 0, "endOffset": 0, - "x": 440, + "x": 380, + "y": 520, + "wires": [ + [ + "87806c641c86c3d9" + ], + [] + ] + }, + { + "id": "87806c641c86c3d9", + "type": "api-current-state", + "z": "a1055886e0cbd337", + "g": "23b8f90b282ac8a2", + "name": "Get Timer Value", + "server": "387b3091.65c5", + "version": 3, + "outputs": 1, + "halt_if": "", + "halt_if_type": "str", + "halt_if_compare": "is", + "entity_id": "input_number.diele_timer_nachtbeleuchtung", + "state_type": "str", + "blockInputOverrides": true, + "outputProperties": [ + { + "property": "payload", + "propertyType": "msg", + "value": "", + "valueType": "entityState" + }, + { + "property": "data", + "propertyType": "msg", + "value": "", + "valueType": "entity" + } + ], + "for": "0", + "forType": "num", + "forUnits": "minutes", + "override_topic": false, + "state_location": "payload", + "override_payload": "msg", + "entity_location": "data", + "override_data": "msg", + "x": 600, + "y": 520, + "wires": [ + [ + "14c3a212afc4cd78" + ] + ] + }, + { + "id": "14c3a212afc4cd78", + "type": "function", + "z": "a1055886e0cbd337", + "g": "23b8f90b282ac8a2", + "name": "Min2Millisekunden", + "func": "// Annahme: msg.payload enthält den Wert in Minuten\nlet minuten = parseFloat(msg.payload);\nmsg.delay = minuten * 60 * 1000; // Minuten → Millisekunden\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 810, "y": 520, "wires": [ [ "43d024d394d94663" - ], - [] + ] ] }, {