- l = g_slist_copy(sdi->probes);
- l = g_slist_remove_link(l, g_slist_nth(l, 0));
- analog.probes = l;
- analog.mq = SR_MQ_RELATIVE_HUMIDITY;
- analog.unit = SR_UNIT_PERCENTAGE;
- analog.data = &humidity;
- sr_session_send(devc->cb_data, &packet);
- g_slist_free(l);
+ if (mic_devs[idx].has_humidity) {
+ l = g_slist_copy(sdi->probes);
+ l = g_slist_remove_link(l, g_slist_nth(l, 0));
+ analog.probes = l;
+ analog.mq = SR_MQ_RELATIVE_HUMIDITY;
+ analog.unit = SR_UNIT_PERCENTAGE;
+ analog.data = &humidity;
+ sr_session_send(devc->cb_data, &packet);
+ g_slist_free(l);
+ }