Hello again
i need to have the input messages to go to the same location every time on output
array 1 night/day
array 2 brightness
im confussed tried to add a dellay to solve it can i do it through function?
[{"id":"b84a7f9a.24408","type":"server-events","z":"cf1115c.2dcd6e8","name":"HA All Events","server":"d0be6c93.2903a","x":270,"y":1320,"wires":[["fd7c9ec6.5f502"]]},{"id":"29e7db9a.11e0a4","type":"function","z":"cf1115c.2dcd6e8","name":"Brightness Value","func":"var temp=msg.payload.event.new_state.attributes.brightness;\nvar msg = {payload:temp};\nmsg.topic = \"brightness\"\nreturn msg;","outputs":1,"noerr":0,"x":890,"y":1320,"wires":[["48d98f79.41b7a","363b56eb.16082a","a435cd2b.f58f9"]]},{"id":"fd7c9ec6.5f502","type":"switch","z":"cf1115c.2dcd6e8","name":"Filter Kitchen lights","property":"payload.entity_id","propertyType":"msg","rules":[{"t":"eq","v":"light.kitchen_lights","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":1320,"wires":[["b8864352.8aa0a"],[]]},{"id":"48d98f79.41b7a","type":"api-current-state","z":"cf1115c.2dcd6e8","name":"","server":"d0be6c93.2903a","halt_if":"","override_topic":false,"override_payload":false,"entity_id":"binary_sensor.sun_up","x":1190,"y":1220,"wires":[["aaeebb7d.751588"]],"outputLabels":["sunnny"]},{"id":"b8864352.8aa0a","type":"rbe","z":"cf1115c.2dcd6e8","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":690,"y":1320,"wires":[["29e7db9a.11e0a4","8525153c.c3f018"]]},{"id":"51dc5e5f.29237","type":"debug","z":"cf1115c.2dcd6e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1990,"y":1300,"wires":[]},{"id":"9148ce4e.b341","type":"rbe","z":"cf1115c.2dcd6e8","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":1590,"y":1320,"wires":[["54d0fcae.af7164"]]},{"id":"54d0fcae.af7164","type":"delay","z":"cf1115c.2dcd6e8","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"2","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1760,"y":1320,"wires":[["bd8cdda.f7d072","51dc5e5f.29237"]]},{"id":"363b56eb.16082a","type":"debug","z":"cf1115c.2dcd6e8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":1840,"y":1200,"wires":[]},{"id":"50646725.16c588","type":"comment","z":"cf1115c.2dcd6e8","name":"Kitchen - Full 30m / Dimming 10s Auto Off 15m","info":"","x":220,"y":1220,"wires":[]},{"id":"8525153c.c3f018","type":"debug","z":"cf1115c.2dcd6e8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":890,"y":1240,"wires":[]},{"id":"aaeebb7d.751588","type":"change","z":"cf1115c.2dcd6e8","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"day","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"night","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1120,"y":1260,"wires":[["b426470c.53a0c8"]]},{"id":"b426470c.53a0c8","type":"delay","z":"cf1115c.2dcd6e8","name":"","pauseType":"delay","timeout":"40","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1290,"y":1260,"wires":[["a435cd2b.f58f9","363b56eb.16082a"]]},{"id":"62495b0d.a79694","type":"change","z":"cf1115c.2dcd6e8","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1590,"y":1260,"wires":[[]]},{"id":"a435cd2b.f58f9","type":"join","z":"cf1115c.2dcd6e8","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"payload","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1470,"y":1320,"wires":[["9148ce4e.b341"]]},{"id":"d0be6c93.2903a","type":"server","z":"","name":"Home Assistant","url":"http://hassio/homeassistant","pass":"dc3135e532cbaf42e85360934d4d6c8db1eff8d668bf130879152a8797022145"}]
message 1
binary_sensor.sun_up : msg.payload : string[3]
"day"
message 2
brightness : msg.payload : number
72
combined
binary_sensor.sun_up : msg.payload : array[2]
array[2]
0: 72
1: "day"