diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c index f1e242228..861e31332 100644 --- a/src/modules/temperature/e_mod_main.c +++ b/src/modules/temperature/e_mod_main.c @@ -77,6 +77,8 @@ _temperature_apply(Config_Face *inst, int temp) { char buf[64]; + if (inst->temp == temp) return; + inst->temp = temp; if (temp != -999) { if (inst->units == FAHRENHEIT) temp = (temp * 9.0 / 5.0) + 32; @@ -139,6 +141,7 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style) inst->high = 80; inst->sensor_type = SENSOR_TYPE_NONE; inst->sensor_name = NULL; + inst->temp = -900; inst->units = CELSIUS; #ifdef HAVE_EEZE inst->backend = UDEV; diff --git a/src/modules/temperature/e_mod_main.h b/src/modules/temperature/e_mod_main.h index a61c92148..52077405c 100644 --- a/src/modules/temperature/e_mod_main.h +++ b/src/modules/temperature/e_mod_main.h @@ -55,6 +55,7 @@ struct _Config_Face int poll_interval; int low, high; int sensor_type; + int temp; const char *sensor_name; Unit units; /* config state */