I have not had an opportunity to integrate the Air Quality sensor yet, but the general principle is the same. The goal is to establish a single MQTT client connection to AWS, and to send a single JSON payload (shadow):
indent preformatted text by 4 spaces
{
"state": {
"reported": {
"temperature": "25.1",
"humidity": "47.1",
"UVIntensity": "0"
}
},
"metadata": {
"reported": {
"temperature": {
"timestamp": 1590451883
},
"humidity": {
"timestamp": 1590451883
},
"UVIntensity": {
"timestamp": 1590451853
}
}
},
"version": 776,
"timestamp": 1590451883,
"clientToken": "ec28eadf-fdf5-4f26-aa60-a268253e569a"
}