Hi, I'm pretty new to Node-red, I've been using it for about 2 years, but only to set things up. Im doing a mayor overhaull on my MQTT based smarthome, which has lights with many ways of controlling them, and I want my dashboard to display all the data changed somewhere else. I decided to use a global variable, since I can just send out a JSON object straight from the global var to MQTT. so I want to have a global JSON object, like this:
payload{
brightness:0-255
white_value:0-255
color{
r:0-255
g:0-255
b:0-255
}
transition:0-150
effect:string
state:string
}
now if I for example change the value of brightness, I want to change that in the object (in a function node) but keep the rest the same