Switch on/off a flow in node red

Hello,

I’m trying to switch on/off a node-red Flow.

I have made a flow with a few light scheduler nodes. (randomly switch on/off lights which I will have working when we are not at home)
I have a Shelly button one and I want with it a long press that the flow will go working.
When I press now long on the button the switch node works. But I cannot switch the schedulers on and of with this switch. They work already themselves.

I am beginner with home assistant, so hopefully can someone help me out with a easy explanation…?

[{“id”:“a213e07090a0c8fb”,“type”:“tab”,“label”:“Flow 8”,“disabled”:false,“info”:“”,“env”:},{“id”:“700d8034a085a47d”,“type”:“ha-switch”,“z”:“a213e07090a0c8fb”,“name”:“Switch “,“version”:0,“debugenabled”:false,“inputs”:0,“outputs”:2,“entityConfig”:“4f3d60708cd99ce2”,“enableInput”:false,“outputOnStateChange”:false,“outputProperties”:[{“property”:“payload”,“propertyType”:“msg”,“value”:”"on"”,“valueType”:“str”},{“property”:“payload”,“propertyType”:“msg”,“value”:“"off"”,“valueType”:“str”}],“x”:90,“y”:140,“wires”:[[“a52c50b990876199”,“c837075898bb332c”,“5c2ee60a8c9fe93a”],[“a52c50b990876199”,“c837075898bb332c”,“5c2ee60a8c9fe93a”]]},{“id”:“a52c50b990876199”,“type”:“light-scheduler”,“z”:“a213e07090a0c8fb”,“settings”:“c0d0da3505ed596a”,“events”:“[{"start":{"dow":1,"mod":1380},"end":{"dow":1,"mod":1385}},{"start":{"dow":2,"mod":1320},"end":{"dow":2,"mod":1325}},{"start":{"dow":2,"mod":1380},"end":{"dow":2,"mod":1385}},{"start":{"dow":3,"mod":1380},"end":{"dow":3,"mod":1385}},{"start":{"dow":4,"mod":1320},"end":{"dow":4,"mod":1325}},{"start":{"dow":4,"mod":1380},"end":{"dow":4,"mod":1385}},{"start":{"dow":5,"mod":1380},"end":{"dow":5,"mod":1385}},{"start":{"dow":6,"mod":0},"end":{"dow":6,"mod":5}},{"start":{"dow":0,"mod":0},"end":{"dow":0,"mod":5}},{"start":{"dow":0,"mod":1320},"end":{"dow":0,"mod":1325}},{"start":{"dow":6,"mod":1320},"end":{"dow":6,"mod":1325}},{"start":{"dow":6,"mod":1380},"end":{"dow":6,"mod":1385}},{"start":{"dow":0,"mod":1380},"end":{"dow":0,"mod":1385}}]”,“topic”:“”,“name”:“Zomervakantie Schedule 00-05”,“onPayload”:“ON”,“onPayloadType”:“str”,“offPayload”:“OFF”,“offPayloadType”:“str”,“onlyWhenDark”:false,“scheduleRndMax”:0,“sunElevationThreshold”:6,“sunShowElevationInStatus”:false,“outputfreq”:“output.statechange”,“x”:190,“y”:240,“wires”:[[“2a33e8db18a400a5”,“8e851c27946a6bc7”]]},{“id”:“8e851c27946a6bc7”,“type”:“switch”,“z”:“a213e07090a0c8fb”,“name”:“”,“property”:“payload”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“ON”,“vt”:“str”},{“t”:“eq”,“v”:“OFF”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:2,“x”:430,“y”:140,“wires”:[[“8d026cd360ef6eb0”],[“84568853b9716e82”]]},{“id”:“8d026cd360ef6eb0”,“type”:“api-call-service”,“z”:“a213e07090a0c8fb”,“name”:“Lampje plug 4 (overloop lamp)”,“server”:“ed23a25a.34bfe”,“version”:5,“debugenabled”:false,“domain”:“switch”,“service”:“turn_on”,“areaId”:,“deviceId”:[“1de04ba3494990532ac3e7868642a5e2”],“entityId”:,“data”:“”,“dataType”:“json”,“mergeContext”:“”,“mustacheAltTags”:false,“outputProperties”:,“queue”:“none”,“output_location”:“”,“output_location_type”:“none”,“x”:730,“y”:140,“wires”:[]},{“id”:“84568853b9716e82”,“type”:“api-call-service”,“z”:“a213e07090a0c8fb”,“name”:“Lampje plug 4 Overloop lamp”,“server”:“ed23a25a.34bfe”,“version”:5,“debugenabled”:false,“domain”:“switch”,“service”:“turn_off”,“areaId”:,“deviceId”:[“1de04ba3494990532ac3e7868642a5e2”],“entityId”:,“data”:“”,“dataType”:“json”,“mergeContext”:“”,“mustacheAltTags”:false,“outputProperties”:,“queue”:“none”,“output_location”:“”,“output_location_type”:“none”,“x”:720,“y”:180,“wires”:[]},{“id”:“2a33e8db18a400a5”,“type”:“api-call-service”,“z”:“a213e07090a0c8fb”,“name”:“Spotjes Tuindeuren”,“server”:“ed23a25a.34bfe”,“version”:5,“debugenabled”:false,“domain”:“light”,“service”:“toggle”,“areaId”:,“deviceId”:[“9eed7e1b5ebcb17e469c018a5ae14527”],“entityId”:,“data”:“{}”,“dataType”:“json”,“mergeContext”:“”,“mustacheAltTags”:false,“outputProperties”:,“queue”:“first”,“output_location”:“”,“output_location_type”:“none”,“x”:470,“y”:220,“wires”:[]},{“id”:“c837075898bb332c”,“type”:“light-scheduler”,“z”:“a213e07090a0c8fb”,“settings”:“c0d0da3505ed596a”,“events”:“[{"start":{"dow":6,"mod":1270},"end":{"dow":6,"mod":1275}},{"start":{"dow":0,"mod":1270},"end":{"dow":0,"mod":1275}},{"start":{"dow":1,"mod":1330},"end":{"dow":1,"mod":1335}},{"start":{"dow":2,"mod":1330},"end":{"dow":2,"mod":1335}},{"start":{"dow":3,"mod":1330},"end":{"dow":3,"mod":1335}},{"start":{"dow":4,"mod":1330},"end":{"dow":4,"mod":1335}},{"start":{"dow":5,"mod":1330},"end":{"dow":5,"mod":1335}},{"start":{"dow":6,"mod":1330},"end":{"dow":6,"mod":1335}},{"start":{"dow":0,"mod":1330},"end":{"dow":0,"mod":1335}},{"start":{"dow":1,"mod":1390},"end":{"dow":1,"mod":1395}},{"start":{"dow":2,"mod":1390},"end":{"dow":2,"mod":1395}},{"start":{"dow":3,"mod":1390},"end":{"dow":3,"mod":1395}},{"start":{"dow":4,"mod":1390},"end":{"dow":4,"mod":1395}},{"start":{"dow":5,"mod":1390},"end":{"dow":5,"mod":1395}},{"start":{"dow":6,"mod":1390},"end":{"dow":6,"mod":1395}},{"start":{"dow":0,"mod":1390},"end":{"dow":0,"mod":1395}},{"start":{"dow":6,"mod":10},"end":{"dow":6,"mod":15}},{"start":{"dow":0,"mod":10},"end":{"dow":0,"mod":15}}]”,“topic”:“”,“name”:“Zomervakantie Schedule 10-15”,“onPayload”:“ON”,“onPayloadType”:“str”,“offPayload”:“OFF”,“offPayloadType”:“str”,“onlyWhenDark”:false,“scheduleRndMax”:0,“sunElevationThreshold”:6,“sunShowElevationInStatus”:false,“outputfreq”:“output.statechange”,“x”:190,“y”:360,“wires”:[[“430a4d812b32ef23”]]},{“id”:“430a4d812b32ef23”,“type”:“api-call-service”,“z”:“a213e07090a0c8fb”,“name”:“Kamer tafellamp”,“server”:“ed23a25a.34bfe”,“version”:5,“debugenabled”:false,“domain”:“light”,“service”:“toggle”,“areaId”:,“deviceId”:[“d924328cc80bb9112f6e96eaa9bb7a8d”],“entityId”:,“data”:“”,“dataType”:“json”,“mergeContext”:“”,“mustacheAltTags”:false,“outputProperties”:,“queue”:“first”,“output_location”:“”,“output_location_type”:“none”,“x”:460,“y”:360,“wires”:[]},{“id”:“5c2ee60a8c9fe93a”,“type”:“light-scheduler”,“z”:“a213e07090a0c8fb”,“settings”:“c0d0da3505ed596a”,“events”:“[{"start":{"dow":6,"mod":1290},"end":{"dow":6,"mod":1305}},{"start":{"dow":1,"mod":1350},"end":{"dow":1,"mod":1365}},{"start":{"dow":2,"mod":1350},"end":{"dow":2,"mod":1365}},{"start":{"dow":3,"mod":1350},"end":{"dow":3,"mod":1365}},{"start":{"dow":4,"mod":1350},"end":{"dow":4,"mod":1365}},{"start":{"dow":5,"mod":1350},"end":{"dow":5,"mod":1365}},{"start":{"dow":6,"mod":1350},"end":{"dow":6,"mod":1365}},{"start":{"dow":0,"mod":1350},"end":{"dow":0,"mod":1365}},{"start":{"dow":2,"mod":1410},"end":{"dow":2,"mod":1425}},{"start":{"dow":1,"mod":1410},"end":{"dow":1,"mod":1425}},{"start":{"dow":3,"mod":1410},"end":{"dow":3,"mod":1425}},{"start":{"dow":4,"mod":1410},"end":{"dow":4,"mod":1425}},{"start":{"dow":5,"mod":1410},"end":{"dow":5,"mod":1425}},{"start":{"dow":6,"mod":1410},"end":{"dow":6,"mod":1425}},{"start":{"dow":0,"mod":1410},"end":{"dow":0,"mod":1425}},{"start":{"dow":0,"mod":30},"end":{"dow":0,"mod":45}},{"start":{"dow":6,"mod":30},"end":{"dow":6,"mod":45}}]”,“topic”:“”,“name”:“Zomervakantie Schedule 30-45”,“onPayload”:“ON”,“onPayloadType”:“str”,“offPayload”:“OFF”,“offPayloadType”:“str”,“onlyWhenDark”:false,“scheduleRndMax”:0,“sunElevationThreshold”:6,“sunShowElevationInStatus”:false,“outputfreq”:“output.statechange”,“x”:170,“y”:480,“wires”:[[“0729897e1a784010”,“0e81a1e042c565d2”]]},{“id”:“0e81a1e042c565d2”,“type”:“switch”,“z”:“a213e07090a0c8fb”,“name”:“”,“property”:“payload”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“ON”,“vt”:“str”},{“t”:“eq”,“v”:“OFF”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:2,“x”:430,“y”:440,“wires”:[[“04f0ad52d27ba249”],[“dc3eb7606dc3a97d”]]},{“id”:“0729897e1a784010”,“type”:“api-call-service”,“z”:“a213e07090a0c8fb”,“name”:“Keuken spotjes”,“server”:“ed23a25a.34bfe”,“version”:5,“debugenabled”:false,“domain”:“light”,“service”:“toggle”,“areaId”:,“deviceId”:[“87395181658c5904f3cb57e9923f475b”],“entityId”:,“data”:“”,“dataType”:“json”,“mergeContext”:“”,“mustacheAltTags”:false,“outputProperties”:,“queue”:“first”,“output_location”:“”,“output_location_type”:“none”,“x”:460,“y”:480,“wires”:[]},{“id”:“04f0ad52d27ba249”,“type”:“api-call-service”,“z”:“a213e07090a0c8fb”,“name”:“Lampje plug 2 werkruimte”,“server”:“ed23a25a.34bfe”,“version”:5,“debugenabled”:false,“domain”:“switch”,“service”:“turn_on”,“areaId”:,“deviceId”:[“e2bb45aff82c78e90e1686ebb112d813”],“entityId”:,“data”:“”,“dataType”:“json”,“mergeContext”:“”,“mustacheAltTags”:false,“outputProperties”:,“queue”:“none”,“output_location”:“”,“output_location_type”:“none”,“x”:710,“y”:420,“wires”:[]},{“id”:“dc3eb7606dc3a97d”,“type”:“api-call-service”,“z”:“a213e07090a0c8fb”,“name”:“Lampje plug 2 werkruimte”,“server”:“ed23a25a.34bfe”,“version”:5,“debugenabled”:false,“domain”:“switch”,“service”:“turn_off”,“areaId”:,“deviceId”:[“e2bb45aff82c78e90e1686ebb112d813”],“entityId”:,“data”:“”,“dataType”:“json”,“mergeContext”:“”,“mustacheAltTags”:false,“outputProperties”:,“queue”:“none”,“output_location”:“”,“output_location_type”:“none”,“x”:710,“y”:460,“wires”:[]},{“id”:“4f3d60708cd99ce2”,“type”:“ha-entity-config”,“server”:“ed23a25a.34bfe”,“deviceConfig”:“”,“name”:“flow Knop”,“version”:“6”,“entityType”:“switch”,“haConfig”:[{“property”:“name”,“value”:“Flow”},{“property”:“icon”,“value”:“”},{“property”:“entity_picture”,“value”:“”},{“property”:“entity_category”,“value”:“”},{“property”:“device_class”,“value”:“”}],“resend”:false,“debugEnabled”:false},{“id”:“c0d0da3505ed596a”,“type”:“light-scheduler-settings”,“name”:“my settings”,“latitude”:“51.5852656”,“longitude”:“5.1518006”},{“id”:“ed23a25a.34bfe”,“type”:“server”,“name”:“Home Assistant”,“addon”:true}]

image

[{"id":"92595b0bce9a6947","type":"light-scheduler","z":"120358abd7c22d30","settings":"","events":"[]","topic":"","name":"","onPayload":"ON","onPayloadType":"str","offPayload":"OFF","offPayloadType":"str","onlyWhenDark":true,"scheduleRndMax":0,"sunElevationThreshold":6,"sunShowElevationInStatus":false,"outputfreq":"output.statechange.startup","x":1968,"y":7840,"wires":[[]]},{"id":"fb5c97ef0105e065","type":"change","z":"120358abd7c22d30","name":"auto","rules":[{"t":"set","p":"payload","pt":"msg","to":"auto","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1778,"y":7808,"wires":[["92595b0bce9a6947"]]},{"id":"cd21c0e55c853cd2","type":"change","z":"120358abd7c22d30","name":"stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1778,"y":7856,"wires":[["92595b0bce9a6947"]]},{"id":"ba5a5ee4cf248794","type":"ha-switch","z":"120358abd7c22d30","name":"","version":0,"debugenabled":false,"inputs":0,"outputs":2,"entityConfig":"","enableInput":false,"outputOnStateChange":true,"outputProperties":[],"x":1602,"y":7808,"wires":[["fb5c97ef0105e065"],["cd21c0e55c853cd2"]]}]

Wowh Kermit!

That’s it. Thanks to helping me out! Really great!
It works!