Right now are a sending something like this
stderr | src/adapters/air4thai/air4thai.spec.ts > Simple client example > individual station
** ERROR (UnsupportedParameterError): Parameter currently unsupported 'o3' was provided.
And it would be even better if we could also provide the dev with a list of parameters that are supported in the error.
And the reason we are seeing this error for o3, which is supported, is because we have two forms of it that we support and the parameter may need to include form identifier to differentiate. An alternative to that would be to do the lookup in a slightly different way. Right now the dev provides something like
parameters = {
PM25: { parameter: 'pm25', unit: 'ug/m3' },
PM10: { parameter: 'pm10', unit: 'ug/m3' },
O3: { parameter: 'o3', unit: 'ppb' },
CO: { parameter: 'co', unit: 'ppm' },
NO2: { parameter: 'no2', unit: 'ppb' },
SO2: { parameter: 'so2', unit: 'ppb' },
}
And we would need to change the o3 part to the following
O3: { parameter: 'o3_parts', unit: 'ppb' },
Another idea would be to change the metrics object a little to be
o3_parts: {
parameter: 'o3',
numeric: true,
units: 'ppm',
converters: {
'ppm': noConversion,
'ppb': ppbToPpm
}
},
And use the combination of the parameter and a check on the keys in the converters to get the right metric.
Right now are a sending something like this
And it would be even better if we could also provide the dev with a list of parameters that are supported in the error.
And the reason we are seeing this error for
o3, which is supported, is because we have two forms of it that we support and the parameter may need to include form identifier to differentiate. An alternative to that would be to do the lookup in a slightly different way. Right now the dev provides something likeAnd we would need to change the
o3part to the followingAnother idea would be to change the metrics object a little to be
And use the combination of the
parameterand a check on the keys in theconvertersto get the right metric.