Change item state only if condition is verified