Hi! I want to ask your assistance on how to further improve the flow as seen below.
If possible, for the part that asks the day, it will have one input with 7 outputs so that I can save space and copy only one node. TIA!
[{"id":"6028eff4.99415","type":"tab","label":"Broadlink Light Timers","disabled":false,"info":""},{"id":"5429e45.fa4cd1c","type":"function","z":"6028eff4.99415","name":"Time Now Vs Time On Set","func":"const states = global.get('homeassistant').homeAssistant.states;\nconst now = new Date();\nconst alarm = states['input_datetime.gf_sala_switch_broadlink_salasidelighton'].attributes;\n\nif(now.getHours() === alarm.hour && now.getMinutes() === alarm.minute) {\n return msg;\n}","outputs":1,"noerr":0,"x":1200,"y":160,"wires":[["aca5d374.45605"]]},{"id":"aca5d374.45605","type":"api-call-service","z":"6028eff4.99415","name":"Turn On Sidelight","server":"37230eeb.6f5a62","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.gf_sala_switch_broadlink_salasidelight","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1430,"y":180,"wires":[[]]},{"id":"bc91d1b4.f8c8d","type":"api-current-state","z":"6028eff4.99415","name":"Is turn on timer enabled?","server":"37230eeb.6f5a62","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.gf_sala_switch_broadlink_salasidelight_turnontimer","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":950,"y":160,"wires":[["5429e45.fa4cd1c"],[]]},{"id":"24eb6ca5.034994","type":"api-current-state","z":"6028eff4.99415","name":"Will I turn it on Mon?","server":"37230eeb.6f5a62","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.gf_sala_switch_broadlink_salasidelight_monday","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":637,"y":100,"wires":[["bcff05d6.2f0d78","bc91d1b4.f8c8d"],[]]},{"id":"b3836258.3fa38","type":"api-current-state","z":"6028eff4.99415","name":"Will I turn it on Tue?","server":"37230eeb.6f5a62","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.gf_sala_switch_broadlink_salasidelight_tuesday","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":631,"y":154,"wires":[["bcff05d6.2f0d78","bc91d1b4.f8c8d"],[]]},{"id":"9eaaba13.e75438","type":"api-current-state","z":"6028eff4.99415","name":"Will I turn it on Wed?","server":"37230eeb.6f5a62","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.gf_sala_switch_broadlink_salasidelight_wednesday","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":641,"y":206,"wires":[["bcff05d6.2f0d78","bc91d1b4.f8c8d"],[]]},{"id":"1535c871.22d738","type":"api-current-state","z":"6028eff4.99415","name":"Will I turn it on Thu?","server":"37230eeb.6f5a62","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.gf_sala_switch_broadlink_salasidelight_thursday","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":641,"y":259,"wires":[["bcff05d6.2f0d78","bc91d1b4.f8c8d"],[]]},{"id":"a8c5d03.1c48f3","type":"api-current-state","z":"6028eff4.99415","name":"Will I turn it on Fri?","server":"37230eeb.6f5a62","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.gf_sala_switch_broadlink_salasidelight_friday","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":631,"y":312,"wires":[["bcff05d6.2f0d78","bc91d1b4.f8c8d"],[]]},{"id":"197d63d.5b0149c","type":"api-current-state","z":"6028eff4.99415","name":"Will I turn it on Sat?","server":"37230eeb.6f5a62","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.gf_sala_switch_broadlink_salasidelight_saturday","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":631,"y":365,"wires":[["bcff05d6.2f0d78","bc91d1b4.f8c8d"],[]]},{"id":"579efeb9.b3411","type":"api-current-state","z":"6028eff4.99415","name":"Will I turn it on Sun?","server":"37230eeb.6f5a62","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.gf_sala_switch_broadlink_salasidelight_sunday","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":641,"y":417,"wires":[["bcff05d6.2f0d78","bc91d1b4.f8c8d"],[]]},{"id":"bcff05d6.2f0d78","type":"api-current-state","z":"6028eff4.99415","name":"Is turn off timer enabled?","server":"37230eeb.6f5a62","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_boolean.gf_sala_switch_broadlink_salasidelight_turnofftimer","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":950,"y":300,"wires":[["89fde4c5.aed678"],[]]},{"id":"89fde4c5.aed678","type":"function","z":"6028eff4.99415","name":"Time Now Vs Time Off Set","func":"const states = global.get('homeassistant').homeAssistant.states;\nconst now = new Date();\nconst alarm = states['input_datetime.gf_sala_switch_broadlink_salasidelightoff'].attributes;\n\nif(now.getHours() === alarm.hour && now.getMinutes() === alarm.minute) {\n return msg;\n}","outputs":1,"noerr":0,"x":1200,"y":300,"wires":[["e18807a9.347028"]]},{"id":"e18807a9.347028","type":"api-call-service","z":"6028eff4.99415","name":"Turn Off Sidelight","server":"37230eeb.6f5a62","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.gf_sala_switch_broadlink_salasidelight","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1430,"y":260,"wires":[[]]},{"id":"adc8923b.43114","type":"function","z":"6028eff4.99415","name":"Checks if it is Sun","func":"var day = new Date().getDay();\n\nvar isSunday = (day === 0) \nvar isMonday = (day === 1)\nvar isTuesday = (day === 2)\nvar isWednesday = (day === 3)\nvar isThursday = (day === 4)\nvar isFriday = (day === 5)\nvar isSaturday = (day === 6)\n\nreturn {\n payload: isSunday,\n};","outputs":1,"noerr":0,"x":267,"y":420,"wires":[["98c559a7.781ec8"]]},{"id":"40eca676.467ef8","type":"function","z":"6028eff4.99415","name":"Checks if it is Sat","func":"var day = new Date().getDay();\n\nvar isSunday = (day === 0) \nvar isMonday = (day === 1)\nvar isTuesday = (day === 2)\nvar isWednesday = (day === 3)\nvar isThursday = (day === 4)\nvar isFriday = (day === 5)\nvar isSaturday = (day === 6)\n\nreturn {\n payload: isSaturday,\n};","outputs":1,"noerr":0,"x":267,"y":368,"wires":[["9224d6f9.75fba8"]]},{"id":"dc2abc62.41d29","type":"function","z":"6028eff4.99415","name":"Checks if it is Fri","func":"var day = new Date().getDay();\n\nvar isSunday = (day === 0) \nvar isMonday = (day === 1)\nvar isTuesday = (day === 2)\nvar isWednesday = (day === 3)\nvar isThursday = (day === 4)\nvar isFriday = (day === 5)\nvar isSaturday = (day === 6)\n\nreturn {\n payload: isFriday,\n};","outputs":1,"noerr":0,"x":257,"y":318,"wires":[["d969d8cc.9340c8"]]},{"id":"b33f5860.3ed8d8","type":"function","z":"6028eff4.99415","name":"Checks if it is Thu","func":"var day = new Date().getDay();\n\nvar isSunday = (day === 0) \nvar isMonday = (day === 1)\nvar isTuesday = (day === 2)\nvar isWednesday = (day === 3)\nvar isThursday = (day === 4)\nvar isFriday = (day === 5)\nvar isSaturday = (day === 6)\n\nreturn {\n payload: isThursday,\n};","outputs":1,"noerr":0,"x":267,"y":265,"wires":[["1535c871.22d738"]]},{"id":"7adecd2.68d0a34","type":"function","z":"6028eff4.99415","name":"Checks if it is Wed","func":"var day = new Date().getDay();\n\nvar isSunday = (day === 0) \nvar isMonday = (day === 1)\nvar isTuesday = (day === 2)\nvar isWednesday = (day === 3)\nvar isThursday = (day === 4)\nvar isFriday = (day === 5)\nvar isSaturday = (day === 6)\n\nreturn {\n payload: isWednesday,\n};","outputs":1,"noerr":0,"x":267,"y":210,"wires":[["8896bb2c.cc8828"]]},{"id":"723dd18d.ec40c","type":"function","z":"6028eff4.99415","name":"Checks if it is Tue","func":"var day = new Date().getDay();\n\nvar isSunday = (day === 0) \nvar isMonday = (day === 1)\nvar isTuesday = (day === 2)\nvar isWednesday = (day === 3)\nvar isThursday = (day === 4)\nvar isFriday = (day === 5)\nvar isSaturday = (day === 6)\n\nreturn {\n payload: isTuesday,\n};","outputs":1,"noerr":0,"x":267,"y":160,"wires":[["36dd5d65.45da12"]]},{"id":"bdbe5f90.9ef1d","type":"function","z":"6028eff4.99415","name":"Checks if it is Mon","func":"var day = new Date().getDay();\n\nvar isSunday = (day === 0) \nvar isMonday = (day === 1)\nvar isTuesday = (day === 2)\nvar isWednesday = (day === 3)\nvar isThursday = (day === 4)\nvar isFriday = (day === 5)\nvar isSaturday = (day === 6)\n\nreturn {\n payload: isMonday,\n};","outputs":1,"noerr":0,"x":267,"y":100,"wires":[["2861666e.0af24a"]]},{"id":"dd17d5d7.024d78","type":"trigger-state","z":"6028eff4.99415","name":"Time Now","server":"37230eeb.6f5a62","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.time","entityidfiltertype":"substring","debugenabled":false,"constraints":[],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":80,"y":240,"wires":[["bdbe5f90.9ef1d","723dd18d.ec40c","7adecd2.68d0a34","b33f5860.3ed8d8","dc2abc62.41d29","40eca676.467ef8","adc8923b.43114"],[]]},{"id":"2861666e.0af24a","type":"switch","z":"6028eff4.99415","name":"Is it Mon?","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":437,"y":100,"wires":[["24eb6ca5.034994"],[]]},{"id":"36dd5d65.45da12","type":"switch","z":"6028eff4.99415","name":"Is it Tue?","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":437,"y":160,"wires":[["b3836258.3fa38"],[]]},{"id":"8896bb2c.cc8828","type":"switch","z":"6028eff4.99415","name":"Is it Wed?","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":437,"y":209,"wires":[["9eaaba13.e75438"],[]]},{"id":"37c96913.cdd746","type":"switch","z":"6028eff4.99415","name":"Is it Thu?","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":437,"y":260,"wires":[[],[]]},{"id":"d969d8cc.9340c8","type":"switch","z":"6028eff4.99415","name":"Is it Fri?","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":437,"y":316,"wires":[["a8c5d03.1c48f3"],[]]},{"id":"9224d6f9.75fba8","type":"switch","z":"6028eff4.99415","name":"Is it Sat?","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":437,"y":360,"wires":[["197d63d.5b0149c"],[]]},{"id":"98c559a7.781ec8","type":"switch","z":"6028eff4.99415","name":"Is it Sun?","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":437,"y":420,"wires":[["579efeb9.b3411"],[]]},{"id":"37230eeb.6f5a62","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]