Disclaimer: This is my first post here and I might use some wrong terms, I'm not a coder.
I'm trying to create circadian light flows based on this tutorial.
My problem is that there is some sort of conflict so that whenever I have multiple flows inside the same tab (or not actually) doing the same thing but controlling different entities (in Home Assistant) all lights are set to max defined brightness and max kelvin. If I only have one flow it works as it should.
This works:
[{"id":"3dd078d0.94ecd8","type":"tab","label":"Works","disabled":false,"info":""},{"id":"ae66a1e1.9ab87","type":"api-current-state","z":"3dd078d0.94ecd8","name":"Lux Yttergang","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.lux_yttergang","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":440,"y":580,"wires":[["9cf5fa8b.b554b8"]]},{"id":"9cf5fa8b.b554b8","type":"switch","z":"3dd078d0.94ecd8","name":"Lux Level","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"160","v2t":"num"},{"t":"btwn","v":"165","vt":"num","v2":"99999","v2t":"num"}],"checkall":"false","repair":false,"outputs":2,"x":620,"y":580,"wires":[["5ffaaa4a.0f56c4","e13a7285.e3d71"],["fb27e809.08cfe8"]]},{"id":"635396a4.1e55a8","type":"api-call-service","z":"3dd078d0.94ecd8","name":"Yttergang på (circadian)","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.yttergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1830,"y":520,"wires":[[]]},{"id":"fb27e809.08cfe8","type":"api-call-service","z":"3dd078d0.94ecd8","name":"Yttergang av","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.yttergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":830,"y":620,"wires":[[]]},{"id":"2316cb77.a2dce4","type":"api-current-state","z":"3dd078d0.94ecd8","name":"Home Mode","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.home_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":150,"y":700,"wires":[["35420fdb.b13f5"]]},{"id":"35420fdb.b13f5","type":"switch","z":"3dd078d0.94ecd8","name":"Mode","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Morgen","vt":"str"},{"t":"eq","v":"Formiddag","vt":"str"},{"t":"eq","v":"Ettermiddag","vt":"str"},{"t":"eq","v":"Kveld","vt":"str"},{"t":"eq","v":"Natta","vt":"str"},{"t":"eq","v":"Hjemmekontor","vt":"str"},{"t":"eq","v":"TV Kveld","vt":"str"},{"t":"nempty"}],"checkall":"true","repair":false,"outputs":8,"x":310,"y":700,"wires":[["ae66a1e1.9ab87"],["ae66a1e1.9ab87"],["ae66a1e1.9ab87"],["ae66a1e1.9ab87"],[],[],[],[]]},{"id":"44ee7f9c.a76d9","type":"function","z":"3dd078d0.94ecd8","name":"Color Temp Kelvin","func":"var newMsg = {\n payload: {\n \"data\": {\n \"kelvin\": msg.payload.kelvin,\n \"brightness_pct\": msg.payload.percent\n }\n }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1590,"y":520,"wires":[["635396a4.1e55a8"]]},{"id":"5ffaaa4a.0f56c4","type":"sun-position","z":"3dd078d0.94ecd8","name":"","positionConfig":"2bc3093e.108386","rules":[],"onlyOnChange":"true","topic":"","outputs":1,"start":"","startType":"none","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"end":"","endType":"none","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"x":830,"y":500,"wires":[["20b99878.39c6d8"]]},{"id":"20b99878.39c6d8","type":"change","z":"3dd078d0.94ecd8","name":"","rules":[{"t":"set","p":"payload.kelvin","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":500,"wires":[["836133f8.c11ba"]]},{"id":"836133f8.c11ba","type":"range","z":"3dd078d0.94ecd8","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.kelvin","name":"percent to kelvin range","x":1260,"y":500,"wires":[["b53d1feb.d5e76"]]},{"id":"e13a7285.e3d71","type":"sun-position","z":"3dd078d0.94ecd8","name":"","positionConfig":"2bc3093e.108386","rules":[],"onlyOnChange":"true","topic":"","outputs":1,"start":"","startType":"none","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"end":"","endType":"none","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"x":830,"y":540,"wires":[["64ef3f44.208c6"]]},{"id":"2417928d.75ae2e","type":"range","z":"3dd078d0.94ecd8","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.percent","name":"percent to brightness","x":1260,"y":540,"wires":[["b53d1feb.d5e76"]]},{"id":"64ef3f44.208c6","type":"change","z":"3dd078d0.94ecd8","name":"","rules":[{"t":"set","p":"payload.percent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":540,"wires":[["2417928d.75ae2e"]]},{"id":"b53d1feb.d5e76","type":"join","z":"3dd078d0.94ecd8","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"1","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1430,"y":520,"wires":[["44ee7f9c.a76d9"]]},{"id":"61329aac.44e694","type":"server","name":"Home Assistant","addon":true},{"id":"2bc3093e.108386","type":"position-config","name":"REDACTED","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]
This does not:
[{"id":"85e34f67.f682","type":"tab","label":"Not work","disabled":false,"info":""},{"id":"b4b88cc1.2e393","type":"api-current-state","z":"85e34f67.f682","name":"Lux Yttergang","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.lux_yttergang","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":340,"wires":[["b82be78c.625e58"]]},{"id":"b82be78c.625e58","type":"switch","z":"85e34f67.f682","name":"Lux Level","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"160","v2t":"num"},{"t":"btwn","v":"165","vt":"num","v2":"99999","v2t":"num"}],"checkall":"false","repair":false,"outputs":2,"x":580,"y":340,"wires":[["30a78a5b.12d336","d345b82e.71cfb8"],["3728d3ca.704dfc"]]},{"id":"6bd0e6cf.1b46d8","type":"api-call-service","z":"85e34f67.f682","name":"Yttergang på (circadian)","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.yttergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1790,"y":280,"wires":[[]]},{"id":"3728d3ca.704dfc","type":"api-call-service","z":"85e34f67.f682","name":"Yttergang av","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.yttergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":790,"y":380,"wires":[[]]},{"id":"4330ac40.4e3de4","type":"api-current-state","z":"85e34f67.f682","name":"Home Mode","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.home_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":110,"y":660,"wires":[["b13e6ff.0c3239"]]},{"id":"b13e6ff.0c3239","type":"switch","z":"85e34f67.f682","name":"Mode","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Morgen","vt":"str"},{"t":"eq","v":"Formiddag","vt":"str"},{"t":"eq","v":"Ettermiddag","vt":"str"},{"t":"eq","v":"Kveld","vt":"str"},{"t":"eq","v":"Natta","vt":"str"},{"t":"eq","v":"Hjemmekontor","vt":"str"},{"t":"eq","v":"TV Kveld","vt":"str"},{"t":"nempty"}],"checkall":"true","repair":false,"outputs":8,"x":270,"y":660,"wires":[["b4b88cc1.2e393","cacc873c.b79b38"],["b4b88cc1.2e393","cacc873c.b79b38"],["b4b88cc1.2e393"],["b4b88cc1.2e393","cacc873c.b79b38"],[],[],[],[]]},{"id":"cacc873c.b79b38","type":"api-current-state","z":"85e34f67.f682","name":"Lux Innergang","server":"61329aac.44e694","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.lux_innergang","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":560,"wires":[["ee799afb.33a378"]]},{"id":"ee799afb.33a378","type":"switch","z":"85e34f67.f682","name":"Lux Level","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"65","v2t":"num"},{"t":"btwn","v":"66","vt":"num","v2":"99999","v2t":"num"}],"checkall":"false","repair":false,"outputs":2,"x":580,"y":560,"wires":[["673ef14.42bdd1","2f3c40c2.abe53"],["cb309e3f.245d"]]},{"id":"3a3ea83d.dd1088","type":"api-call-service","z":"85e34f67.f682","name":"Innergang på (circadian)","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.innergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1790,"y":500,"wires":[[]]},{"id":"cb309e3f.245d","type":"api-call-service","z":"85e34f67.f682","name":"Innergang av","server":"61329aac.44e694","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.innergang","data":"{\"transition\":\"5\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":790,"y":600,"wires":[[]]},{"id":"345f19ac.125226","type":"function","z":"85e34f67.f682","name":"Color Temp Kelvin","func":"var newMsg = {\n payload: {\n \"data\": {\n \"kelvin\": msg.payload.kelvin,\n \"brightness_pct\": msg.payload.percent\n }\n }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1550,"y":280,"wires":[["6bd0e6cf.1b46d8"]]},{"id":"30a78a5b.12d336","type":"sun-position","z":"85e34f67.f682","name":"","positionConfig":"2bc3093e.108386","rules":[],"onlyOnChange":"true","topic":"","outputs":1,"start":"","startType":"none","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"end":"","endType":"none","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"x":790,"y":260,"wires":[["af2b2557.f83e78"]]},{"id":"af2b2557.f83e78","type":"change","z":"85e34f67.f682","name":"","rules":[{"t":"set","p":"payload.kelvin","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":260,"wires":[["6b4c75ea.15dd9c"]]},{"id":"6b4c75ea.15dd9c","type":"range","z":"85e34f67.f682","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.kelvin","name":"percent to kelvin range","x":1220,"y":260,"wires":[["7efa3f9b.4e462"]]},{"id":"d345b82e.71cfb8","type":"sun-position","z":"85e34f67.f682","name":"","positionConfig":"2bc3093e.108386","rules":[],"onlyOnChange":"true","topic":"","outputs":1,"start":"","startType":"none","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"end":"","endType":"none","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"x":790,"y":300,"wires":[["5151c2c2.617b7c"]]},{"id":"e2cd04b5.a65d78","type":"range","z":"85e34f67.f682","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.percent","name":"percent to brightness","x":1220,"y":300,"wires":[["7efa3f9b.4e462"]]},{"id":"5151c2c2.617b7c","type":"change","z":"85e34f67.f682","name":"","rules":[{"t":"set","p":"payload.percent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":300,"wires":[["e2cd04b5.a65d78"]]},{"id":"7efa3f9b.4e462","type":"join","z":"85e34f67.f682","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"1","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1390,"y":280,"wires":[["345f19ac.125226"]]},{"id":"f12d0fbd.1c9d4","type":"function","z":"85e34f67.f682","name":"Color Temp Kelvin","func":"var newMsg = {\n payload: {\n \"data\": {\n \"kelvin\": msg.payload.kelvin,\n \"brightness_pct\": msg.payload.percent\n }\n }\n}\n\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1550,"y":500,"wires":[["3a3ea83d.dd1088"]]},{"id":"673ef14.42bdd1","type":"sun-position","z":"85e34f67.f682","name":"","positionConfig":"2bc3093e.108386","rules":[],"onlyOnChange":"true","topic":"","outputs":1,"start":"","startType":"none","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"end":"","endType":"none","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"x":790,"y":480,"wires":[["73309b09.68cf74"]]},{"id":"73309b09.68cf74","type":"change","z":"85e34f67.f682","name":"","rules":[{"t":"set","p":"payload.kelvin","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":480,"wires":[["3ce16c94.0762f4"]]},{"id":"3ce16c94.0762f4","type":"range","z":"85e34f67.f682","minin":"0","maxin":"100","minout":"2500","maxout":"5500","action":"clamp","round":true,"property":"payload.kelvin","name":"percent to kelvin range","x":1220,"y":480,"wires":[["8765bec5.16d8a"]]},{"id":"2f3c40c2.abe53","type":"sun-position","z":"85e34f67.f682","name":"","positionConfig":"2bc3093e.108386","rules":[],"onlyOnChange":"true","topic":"","outputs":1,"start":"","startType":"none","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"end":"","endType":"none","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"x":790,"y":520,"wires":[["9d4a6194.9026"]]},{"id":"7860b2d8.02ce0c","type":"range","z":"85e34f67.f682","minin":"0","maxin":"100","minout":"50","maxout":"80","action":"clamp","round":true,"property":"payload.percent","name":"percent to brightness","x":1220,"y":520,"wires":[["8765bec5.16d8a"]]},{"id":"9d4a6194.9026","type":"change","z":"85e34f67.f682","name":"","rules":[{"t":"set","p":"payload.percent","pt":"msg","to":"payload.altitudePercent","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":520,"wires":[["7860b2d8.02ce0c"]]},{"id":"8765bec5.16d8a","type":"join","z":"85e34f67.f682","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1390,"y":500,"wires":[["f12d0fbd.1c9d4"]]},{"id":"61329aac.44e694","type":"server","name":"Home Assistant","addon":true},{"id":"2bc3093e.108386","type":"position-config","name":"REDACTED","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]
I've tried to change context back and forth but I'm unable to figure this one out.
Any help is much appreciated, the WAF is at a low now..