value is % of difference with stocked value. if new value is stored if // superior or inferior at value +/- x% $properties2log = array( "availability" => null, "action" => null, "state" =>null, "contact" => null, "temperature" => 0.5, "local_temperature" => 0.5, "state_l1" => null, "state_l2" => null, "humidity" => null, "current_heating_setpoint" => null, "position" => null, "pressure" => 10, "occupancy" => null, "tamper" => null, "illuminance_lux" => function($value) {($value < 500?50:$value*10/100); return $value;}, // "illuminance" => 8, "requested_brightness_level" => function($value) {($value < 500?50:$value*10/100);return $value;}, "tempf" => 0.5, "humidity" => null, "dewptf" => 0.5, "windchillf" => 0.5, "winddir" => 40, "windspeedmph" => 5, "windgustmph" => 5, "rainin" => null, //"dailyrainin" => null, //"weeklyrainin" => null, //"monthlyrainin" => null, //"yearlyrainin" => null, "solarradiation" => 10, "UV" => null, "indoortempf" => 0.5, "indoorhumidity" => null, "baromin" => 10 );