From: Sarah Fischmann Date: Wed, 29 Aug 2018 14:18:51 +0000 (-0400) Subject: add support for humidity in sensors plugin X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1c9362a971d62d4278bb29beb07186d6d2b4f932;p=collectd.git add support for humidity in sensors plugin --- diff --git a/src/sensors.c b/src/sensors.c index 41cccf1b..e467fd90 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -365,6 +365,7 @@ static int sensors_load_conf(void) { if ((feature->type != SENSORS_FEATURE_IN) && (feature->type != SENSORS_FEATURE_FAN) && (feature->type != SENSORS_FEATURE_TEMP) && + (feature->type != SENSORS_FEATURE_HUMIDITY) && #if SENSORS_API_VERSION >= 0x402 (feature->type != SENSORS_FEATURE_CURR) && #endif @@ -384,6 +385,7 @@ static int sensors_load_conf(void) { if ((subfeature->type != SENSORS_SUBFEATURE_IN_INPUT) && (subfeature->type != SENSORS_SUBFEATURE_FAN_INPUT) && (subfeature->type != SENSORS_SUBFEATURE_TEMP_INPUT) && + (subfeature->type != SENSORS_SUBFEATURE_HUMIDITY_INPUT) && #if SENSORS_API_VERSION >= 0x402 (subfeature->type != SENSORS_SUBFEATURE_CURR_INPUT) && #endif @@ -517,6 +519,8 @@ static int sensors_read(void) { type = "temperature"; else if (fl->feature->type == SENSORS_FEATURE_POWER) type = "power"; + else if (fl->feature->type == SENSORS_FEATURE_HUMIDITY) + type = "humidity"; #if SENSORS_API_VERSION >= 0x402 else if (fl->feature->type == SENSORS_FEATURE_CURR) type = "current";