[{"id":"93f5902e5ccfd5aa","type":"inject","z":"a0d0f696507d618e","name":"true at 21:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 21 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":140,"y":860,"wires":[["96d9468792f078ab"]]},{"id":"3cdd37517436468d","type":"inject","z":"a0d0f696507d618e","name":"false at 05:00","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 05 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":140,"y":900,"wires":[["96d9468792f078ab"]]},{"id":"a76a0e6efab626b9","type":"inject","z":"a0d0f696507d618e","name":"Ligth on","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":120,"y":980,"wires":[["96d9468792f078ab"]]},{"id":"d7536ce5a1f1d377","type":"inject","z":"a0d0f696507d618e","name":"Ligth off","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":120,"y":1020,"wires":[["96d9468792f078ab"]]},{"id":"96d9468792f078ab","type":"function","z":"a0d0f696507d618e","name":"function 9","func":"let msg1 = {}\nlet msg2 = {}\n\nlet zeit = context.get(\"zeit\") || false\nlet light = context.get(\"light\") || 'off'\n\n// remove or comment (node.warn..) when done.\nlet invar = msg.payload\nswitch (invar) {\n case 'on':\n node.warn('light on')\n light = 'on'\n if (zeit === true) {\n msg1.payload = 'roller shutter down'\n node.send([msg1, null])\n }\n break\n case 'off':\n node.warn('ligth off')\n light = 'off'\n msg2.payload = 'roller shutter up'\n node.send([null, msg2])\n break\n case true:\n node.warn('zeit true')\n zeit = true\n if(light === 'on') {\n msg1.payload = 'roller shutter down'\n node.send([msg1, null])\n }\n break\n case false:\n node.warn('zeit false')\n zeit = false\n if(light === 'on') {\n msg2.payload = 'roller shutter up'\n node.send([null, msg2])\n }\n break \n}\n\ncontext.set(\"zeit\", zeit)\ncontext.set(\"light\", light)","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":940,"wires":[["c4b2de49b0d91c13"],["2c9ca485f8af0111"]]},{"id":"c4b2de49b0d91c13","type":"debug","z":"a0d0f696507d618e","name":"roller shutter down","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":570,"y":920,"wires":[]},{"id":"2c9ca485f8af0111","type":"debug","z":"a0d0f696507d618e","name":"roller shutter up","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":960,"wires":[]}]
Is this what you are after?