Gauge value toggles between zero and value

High,
my problem is following:
Sending several JSON data packages from my ESP32 to my node-red
frontend following happens:

Within the third package I sent UV-level values and decode
it with a function node:

var ESP_ADCha1 = { payload: msg.payload.adcval1 };
var ESP_UVSens = { payload: msg.payload.UV_Sensor };
var ESP_5V = { payload: msg.payload.ESP_5Volt };
return [ESP_ADCha1, ESP_UVSens, ESP_5V];

I visualize the above data by means of three gauges.
This works fine.

In order to 'amplify' the UV-sensor data by factor 2
I simply multiplied the origin data value with 2, see example:

var ESP_ADCha1 = { payload: msg.payload.adcval1 };
var ESP_UVSens = { payload: msg.payload.UV_Sensor * 2 };
var ESP_5V = { payload: msg.payload.ESP_5Volt };
return [ESP_ADCha1, ESP_UVSens, ESP_5V];

Visualizing the output on the gauge I see that the gauge
toggles between 0 and the multiplied value. I expected
a constant output.
What must I do?

Of course I could adapt the value inside the ESP32 but I prefer to
manipolate it inside node-red.
Thanks, Alf

Is it possible that msg.payload.UV_Sensor is a string rather than a number (feed the message into a debug node to check. That would prevent the *2 from working. Though I would not expect it to toggle, unless the incoming value is not consistent.

Add a debug node configured to show msg.payload.UV_Sensor and check that the values are consistent and are numbers.

Hi Colin,
to me it is a value, because the function multiplies the origin value without problems, I checked that..
It seems, that as soon as the other data packages are received (packages 1,2,4) the UV-sensor values from data package 3 are not available and the gauge shows zero...
NOT doing the multiplication, leaving the payload as it comes from the ESP32, the display is consistant and shows the origin value.
Alf

Uploading: wg. node-red problem_1.jpg...
here's a sreenshot...

You will need to check that the value is set, i would try something like this, I leave the original object as is then pass the object through a switch node, checking that the property key of payload exists.

[{"id":"7cb49ed1.f23d58","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"($random()*1 )> 0.2 ?\t{\"adcval1\":1,\"UV_Sensor\":2.2,\"ESP_5Volt\":3} :\t{\"adcval1\":1,\"ESP_5Volt\":3}","payloadType":"jsonata","x":270,"y":840,"wires":[["91d4624e.05c058","353dd9db.a0d64e"]]},{"id":"91d4624e.05c058","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":780,"wires":[]},{"id":"353dd9db.a0d64e","type":"switch","z":"bf9e1e33.030598","name":"","property":"payload","propertyType":"msg","rules":[{"t":"hask","v":"UV_Sensor","vt":"str"},{"t":"hask","v":"ESP_5Volt","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":440,"y":840,"wires":[["394a1d81.04daca"],["8e911d52.4f08e8"]]},{"id":"394a1d81.04daca","type":"function","z":"bf9e1e33.030598","name":"","func":"msg.payload.UV_Sensor *= 2;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":820,"wires":[["cf18ded0.86cc18","91d4624e.05c058"]]},{"id":"8e911d52.4f08e8","type":"ui_gauge","z":"bf9e1e33.030598","name":"","group":"8b5cde76.edd58","order":2,"width":0,"height":0,"gtype":"gage","title":"esp","label":"units","format":"{{msg.payload.ESP_5Volt | number }}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":750,"y":840,"wires":[]},{"id":"cf18ded0.86cc18","type":"ui_gauge","z":"bf9e1e33.030598","name":"","group":"8b5cde76.edd58","order":2,"width":0,"height":0,"gtype":"gage","title":"uv","label":"units","format":"{{msg.payload.UV_Sensor | number }}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":750,"y":800,"wires":[]},{"id":"8b5cde76.edd58","type":"ui_group","name":"default","tab":"8f03e639.85956","order":1,"disp":false,"width":"12","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

The inject produces an object that randomly is missing the sensor key.
[edit] added correct function.