Thank you so much @sheminasalam . This works. I made a writeup version with example below.
It does:
Sensor to detect if day/afternoon/etc
Set brightness to specific % during those phases
Reuse for any flows where you want to call lights.
(My case is a cat walking at night and triggering sensors - I want to save on energy)
[{"id":"7fef90a1.ec014","type":"tab","label":"Set brightness according to day time","disabled":false,"info":""},{"id":"6df601b2.d507b","type":"debug","z":"7fef90a1.ec014","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":420,"wires":[]},{"id":"44f6bc48.529104","type":"api-call-service","z":"7fef90a1.ec014","name":"Light ON","server":"a0eea9da.0fe1d8","version":1,"debugenabled":true,"service_domain":"light","service":"turn_on","entityId":"light.wasdeconzgroup","data":"{\"brightness_pct\":\"{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":560,"y":420,"wires":[["6df601b2.d507b"]]},{"id":"302576ec.1a904a","type":"function","z":"7fef90a1.ec014","name":"Set brightness","func":"msg.payload = global.get(\"dayphasebrightness\")\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":420,"wires":[["44f6bc48.529104"]]},{"id":"81af8b92.df1098","type":"inject","z":"7fef90a1.ec014","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":420,"wires":[["302576ec.1a904a"]]},{"id":"164f62c2.0e411d","type":"server-state-changed","z":"7fef90a1.ec014","name":"Day Phase","server":"a0eea9da.0fe1d8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.day_phase","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":160,"y":180,"wires":[["77c6b46c.f86eec"]]},{"id":"77c6b46c.f86eec","type":"switch","z":"7fef90a1.ec014","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Morning","vt":"str"},{"t":"eq","v":"Day","vt":"str"},{"t":"eq","v":"Evening","vt":"str"},{"t":"eq","v":"Night","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":410,"y":180,"wires":[["4580a4df.a1ad7c"],["dc8bb1e8.b17ff"],["373cae69.2cd632"],["a7a4e698.7f74a8"]]},{"id":"4580a4df.a1ad7c","type":"function","z":"7fef90a1.ec014","name":"morning:100","func":"global.set(\"dayphasebrightness\",100);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":670,"y":140,"wires":[[]]},{"id":"dc8bb1e8.b17ff","type":"function","z":"7fef90a1.ec014","name":"day: 90","func":"global.set(\"dayphasebrightness\",90);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":660,"y":180,"wires":[[]]},{"id":"373cae69.2cd632","type":"function","z":"7fef90a1.ec014","name":"Evening: 70","func":"global.set(\"dayphasebrightness\",70);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":670,"y":220,"wires":[[]]},{"id":"a7a4e698.7f74a8","type":"function","z":"7fef90a1.ec014","name":"night: 1","func":"global.set(\"dayphasebrightness\",1);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":660,"y":260,"wires":[[]]},{"id":"88e2252.c0566d8","type":"comment","z":"7fef90a1.ec014","name":"Create a sensor (click for code)","info":"#add this to your configuration.yaml\n#reload \"template\" entities and groups\n#click out and back to node-red\n - platform: template\n sensors:\n day_phase:\n friendly_name: 'Day Phase'\n# entity_id: sensor.time\n value_template: >\n {% if now() > now().replace(hour=5).replace(minute=0).replace(second=0) and\n now() < now().replace(hour=7).replace(minute=0).replace(second=0) %}\n Morning\n {% elif states('sun.sun') == 'above_horizon' or\n now() > now().replace(hour=5).replace(minute=0).replace(second=0) and\n now() < now().replace(hour=12).replace(minute=0).replace(second=0) %}\n Day\n {% elif now() < now().replace(hour=21).replace(minute=45).replace(second=0) and\n now() > now().replace(hour=5).replace(minute=0).replace(second=0) %}\n Evening\n {% else %}\n Night\n {% endif %}\n icon_template: >\n {% set phase = states('sensor.day_phase') %}\n {% if phase == 'Morning' %} mdi:weather-sunset-up\n {% elif phase =='Day' %} mdi:weather-sunny\n {% elif phase == 'Evening' %} mdi:weather-sunset-down\n {% else %} mdi:weather-night\n {% endif %}","x":230,"y":100,"wires":[]},{"id":"c2b9642a.52e3a8","type":"comment","z":"7fef90a1.ec014","name":"This sets your brightness","info":"","x":710,"y":100,"wires":[]},{"id":"672001e8.5376a","type":"comment","z":"7fef90a1.ec014","name":"Example of use","info":"Of course, replace \"timestamp\" with a button, sensor or else to trigger it","x":180,"y":340,"wires":[]},{"id":"b86b83ce.90ea6","type":"comment","z":"7fef90a1.ec014","name":"Universal","info":"No need to change this - you can reuse in all cases","x":340,"y":380,"wires":[]},{"id":"d8fcc9e0.60b0b8","type":"comment","z":"7fef90a1.ec014","name":"Example code under \"data\"","info":"{\"brightness_pct\":\"{{payload}}\"}","x":610,"y":380,"wires":[]},{"id":"2ea1b154.a492ae","type":"comment","z":"7fef90a1.ec014","name":"Delete if not needed","info":"You don't need this one unless you want to debug","x":850,"y":380,"wires":[]},{"id":"f0254a2a.68c458","type":"comment","z":"7fef90a1.ec014","name":"This is a global code to set the brightness wherever you want to use it. Only set this once, it can be used across all your flows since it's a \"global\" parameter","info":"Why do I use this?\nI have a cat... and lots of sensors and lights.\nI want to set the brighness to almost nothing during the night since the cat constantly triggers my sensors.","x":550,"y":60,"wires":[]},{"id":"a0eea9da.0fe1d8","type":"server","name":"Home Assistant New","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]