From 736b85657e106c54691bc10b29e6f64c2312bcd2 Mon Sep 17 00:00:00 2001 From: theautomation Date: Tue, 2 Jan 2024 19:57:42 +0100 Subject: [PATCH] Add flow context active boolean --- src/data/flows/backyard_light_dynamics.json | 115 +++++++++++++++++--- 1 file changed, 98 insertions(+), 17 deletions(-) diff --git a/src/data/flows/backyard_light_dynamics.json b/src/data/flows/backyard_light_dynamics.json index a837b01..55305c1 100644 --- a/src/data/flows/backyard_light_dynamics.json +++ b/src/data/flows/backyard_light_dynamics.json @@ -28,7 +28,7 @@ "exposeAsEntityConfig": "", "entityId": "binary_sensor.backdoor", "entityIdType": "exact", - "outputInitially": true, + "outputInitially": false, "stateType": "str", "ifState": "on", "ifStateType": "str", @@ -66,9 +66,11 @@ "y": 60, "wires": [ [ - "62d81c701468e19d" + "36f6d937dac70d3b" ], - [] + [ + "36f6d937dac70d3b" + ] ] }, { @@ -107,7 +109,7 @@ "override_payload": "msg", "entity_location": "data", "override_data": "msg", - "x": 280, + "x": 660, "y": 60, "wires": [ [ @@ -137,7 +139,7 @@ "outputLocationType": "msg", "outputLocation": "payload", "outputResultsCount": 1, - "x": 460, + "x": 840, "y": 120, "wires": [ [ @@ -165,7 +167,7 @@ "outputLocationType": "msg", "outputLocation": "payload", "outputResultsCount": 1, - "x": 460, + "x": 840, "y": 60, "wires": [ [ @@ -185,7 +187,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 660, + "x": 1040, "y": 60, "wires": [ [ @@ -197,12 +199,12 @@ "id": "8f4a7b8ae2cc4f22", "type": "stoptimer", "z": "4b48188ca7b303d7", - "duration": "1", + "duration": "2", "units": "Minute", "payloadtype": "num", "payloadval": "0", "name": "", - "x": 1060, + "x": 1440, "y": 60, "wires": [ [ @@ -232,7 +234,7 @@ "mustacheAltTags": false, "outputProperties": [], "queue": "all", - "x": 870, + "x": 1250, "y": 60, "wires": [ [ @@ -251,7 +253,7 @@ "arraySpltType": "len", "stream": false, "addname": "", - "x": 1390, + "x": 1770, "y": 60, "wires": [ [ @@ -278,7 +280,7 @@ "from": "", "to": "", "reg": false, - "x": 1240, + "x": 1620, "y": 60, "wires": [ [ @@ -307,10 +309,12 @@ "mustacheAltTags": false, "outputProperties": [], "queue": "none", - "x": 1700, + "x": 2080, "y": 60, "wires": [ - [] + [ + "f8cde10a25c99253" + ] ] }, { @@ -334,10 +338,12 @@ "mustacheAltTags": false, "outputProperties": [], "queue": "none", - "x": 1700, + "x": 2080, "y": 120, "wires": [ - [] + [ + "f8cde10a25c99253" + ] ] }, { @@ -362,7 +368,7 @@ "checkall": "true", "repair": false, "outputs": 2, - "x": 1510, + "x": 1890, "y": 60, "wires": [ [ @@ -373,6 +379,81 @@ ] ] }, + { + "id": "f8cde10a25c99253", + "type": "change", + "z": "4b48188ca7b303d7", + "name": "", + "rules": [ + { + "t": "set", + "p": "active", + "pt": "flow", + "to": "false", + "tot": "bool" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2300, + "y": 60, + "wires": [ + [] + ] + }, + { + "id": "36f6d937dac70d3b", + "type": "switch", + "z": "4b48188ca7b303d7", + "name": "flow not active", + "property": "active", + "propertyType": "flow", + "rules": [ + { + "t": "false" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 300, + "y": 60, + "wires": [ + [ + "cfb9524c088b31a3" + ] + ] + }, + { + "id": "cfb9524c088b31a3", + "type": "change", + "z": "4b48188ca7b303d7", + "name": "", + "rules": [ + { + "t": "set", + "p": "active", + "pt": "flow", + "to": "true", + "tot": "bool" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 480, + "y": 60, + "wires": [ + [ + "62d81c701468e19d" + ] + ] + }, { "id": "4ba92433.2478cc", "type": "server",