Just in time for this xmas! lol
One way of using payloads to change Home Assistant Node-Red lighting entities. Brightness etc...
(Using a random and template node)
If you take a look inside the template node you can alter the transition times to make it more of a snap or fade change.
Any attribute of the light can be changed inside this node: RGB etc....
I've setup random lighting level changes (between 50 and 100%) for two lights in the attached flow.
A place to start!
Just adjust the HA nodes with your lighting entities and deploy.
[{"id":"f92e782e.404ad","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"d4cabfb3.1e922","type":"template","z":"f92e782e.404ad","name":"Payload/transittion time","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\"brightness_pct\":{{payload}},\"transition\":1}","output":"json","x":730,"y":200,"wires":[["aead64eb.d37938"]]},{"id":"f4499f26.94f5d","type":"inject","z":"f92e782e.404ad","name":"2 second inject","props":[{"p":"payload"}],"repeat":"2","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":160,"wires":[["aa01ee28.fed7","536b1e06.c058e"]]},{"id":"3e6835b2.1b8eb2","type":"api-call-service","z":"f92e782e.404ad","name":"Light 1","server":"2cdd61c7.88dc4e","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.firefly_lights","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":200,"wires":[[]]},{"id":"aead64eb.d37938","type":"change","z":"f92e782e.404ad","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.data","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":200,"wires":[["3e6835b2.1b8eb2"]]},{"id":"aa01ee28.fed7","type":"random","z":"f92e782e.404ad","name":"","low":"50","high":"100","inte":"true","property":"payload","x":320,"y":100,"wires":[["d4cabfb3.1e922"]]},{"id":"834b9089.c4d178","type":"template","z":"f92e782e.404ad","name":"Payload/transittion time","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\"brightness_pct\":{{payload}},\"transition\":0.5}","output":"json","x":730,"y":260,"wires":[["4a38c175.217878"]]},{"id":"175d85c1.f458fa","type":"api-call-service","z":"f92e782e.404ad","name":"Light 2","server":"2cdd61c7.88dc4e","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.firefly_lights","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":260,"wires":[[]]},{"id":"4a38c175.217878","type":"change","z":"f92e782e.404ad","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.data","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":260,"wires":[["175d85c1.f458fa"]]},{"id":"536b1e06.c058e","type":"random","z":"f92e782e.404ad","name":"","low":"50","high":"100","inte":"true","property":"payload","x":320,"y":160,"wires":[["834b9089.c4d178"]]},{"id":"8630af70.c555b","type":"inject","z":"f92e782e.404ad","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10","payloadType":"num","x":390,"y":260,"wires":[["d4cabfb3.1e922","834b9089.c4d178"]]},{"id":"36a09c1.f608464","type":"inject","z":"f92e782e.404ad","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"100","payloadType":"num","x":390,"y":300,"wires":[["834b9089.c4d178","d4cabfb3.1e922"]]},{"id":"6de2eee6.36ed9","type":"comment","z":"f92e782e.404ad","name":"Auto 2 second inject","info":"","x":110,"y":100,"wires":[]},{"id":"5f5e1f45.e48f3","type":"comment","z":"f92e782e.404ad","name":"Or inject brightness via payload manually or another node","info":"","x":230,"y":220,"wires":[]},{"id":"2cdd61c7.88dc4e","type":"server","z":"","name":"Home Assistant- Raspberry"}]