Rather than simply adding everything to a dict, the json_data should be an array with sensor id as the key. Once the array is populated from sensor_data, we simply iterate through the array and see if the sensor data needs to be rebroadcast via MQTT. showerthoughts
Rather than simply adding everything to a dict, the json_data should be an array with sensor id as the key. Once the array is populated from sensor_data, we simply iterate through the array and see if the sensor data needs to be rebroadcast via MQTT. showerthoughts