edit I am incorrect, i will post a test flow.
Apologies, i made quick assumptions, the undefined
error comes from the gauge node that doesn't accept other data than the one defined.
With this flow it should work, instead of using a "split", it contains 2 switch nodes that only passes data when either temperature or humidity exists. Replace the inject nodes with the mqtt node
[{"id":"5e695d79.c5a7f4","type":"ui_gauge","z":"50a9d0fb.ca78d","name":"","group":"9aa3571e.b6013","order":2,"width":0,"height":0,"gtype":"gage","title":"temperatura","label":"c","format":"{{msg.payload.temperatura.value}}","min":"-20","max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":686,"y":672,"wires":[]},{"id":"7030a7e6.81464","type":"ui_gauge","z":"50a9d0fb.ca78d","name":"","group":"9aa3571e.b6013","order":2,"width":0,"height":0,"gtype":"gage","title":"humidity","label":"%","format":"{{msg.payload.humidade.value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":676,"y":728,"wires":[]},{"id":"b8e3427b.68e8d","type":"inject","z":"50a9d0fb.ca78d","name":"{\"temperatura\":{\"value\":24}}","topic":"","payload":"{\"temperatura\":{\"value\":24}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":232,"y":672,"wires":[["dbb7cea4.d730d8","8ead371d.55a9d"]]},{"id":"514b08ba.318018","type":"inject","z":"50a9d0fb.ca78d","name":"{\"humidade\":{\"value\":52}}","topic":"","payload":"{\"humidade\":{\"value\":52}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":222,"y":728,"wires":[["8ead371d.55a9d","dbb7cea4.d730d8"]]},{"id":"8ead371d.55a9d","type":"switch","z":"50a9d0fb.ca78d","name":"humidity","property":"payload.humidade","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":480,"y":728,"wires":[["7030a7e6.81464"]]},{"id":"dbb7cea4.d730d8","type":"switch","z":"50a9d0fb.ca78d","name":"temperatura","property":"payload.temperatura","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":490,"y":672,"wires":[["5e695d79.c5a7f4"]]},{"id":"9aa3571e.b6013","type":"ui_group","z":"","name":"Default","tab":"76ec6942.7f7ab","disp":true,"width":"17","collapse":false},{"id":"76ec6942.7f7ab","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]